From 3ded6d8237f5ee36ac7753d76acb51101b88e70a Mon Sep 17 00:00:00 2001 From: Divyank Aggarwal Date: Sun, 16 Oct 2022 23:23:47 +0530 Subject: [PATCH] refactor(rust): refactored identity show command to use rpc abstraction and to stop mapping errors manually deleted unused methods --- .../rust/ockam/ockam_command/src/util/api.rs | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/implementations/rust/ockam/ockam_command/src/util/api.rs b/implementations/rust/ockam/ockam_command/src/util/api.rs index b162a2e112a..ea0ddd1f53d 100644 --- a/implementations/rust/ockam/ockam_command/src/util/api.rs +++ b/implementations/rust/ockam/ockam_command/src/util/api.rs @@ -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> { - 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") @@ -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::()?; - Ok(( - response, - dec.decode::()?, - )) -} - pub(crate) fn parse_short_identity_response( resp: &[u8], ) -> Result<(Response, models::identity::ShortIdentityResponse<'_>)> {