Skip to content

Commit

Permalink
refactor(rust): refactored identity show command to use rpc abstracti…
Browse files Browse the repository at this point in the history
…on and to stop mapping errors manually

deleted unused methods
  • Loading branch information
divyank-aggarwal committed Oct 16, 2022
1 parent 324d941 commit 3ded6d8
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions implementations/rust/ockam/ockam_command/src/util/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,6 @@ pub(crate) fn delete_tcp_connection(
Ok(buf)
}

/// Construct a request to export Identity
#[allow(unused)]
pub(crate) fn long_identity() -> Result<Vec<u8>> {
let mut buf = vec![];
Request::post("/node/identity/actions/show/long").encode(&mut buf)?;
Ok(buf)
}

/// Construct a request to print Identity Id
pub(crate) fn short_identity() -> RequestBuilder<'static, ()> {
Request::post("/node/identity/actions/show/short")
Expand Down Expand Up @@ -395,18 +387,6 @@ pub(crate) fn parse_transport_status(
))
}

#[allow(unused)]
pub(crate) fn parse_long_identity_response(
resp: &[u8],
) -> Result<(Response, models::identity::LongIdentityResponse<'_>)> {
let mut dec = Decoder::new(resp);
let response = dec.decode::<Response>()?;
Ok((
response,
dec.decode::<models::identity::LongIdentityResponse>()?,
))
}

pub(crate) fn parse_short_identity_response(
resp: &[u8],
) -> Result<(Response, models::identity::ShortIdentityResponse<'_>)> {
Expand Down

0 comments on commit 3ded6d8

Please sign in to comment.