From fb6c487d42c7022f62e3f33ab34b76121a919d79 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Sun, 6 Nov 2022 22:14:22 -0800 Subject: cli: use 'Nsid' type --- adenosine-cli/src/lib.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'adenosine-cli/src/lib.rs') diff --git a/adenosine-cli/src/lib.rs b/adenosine-cli/src/lib.rs index 5d08286..aed8480 100644 --- a/adenosine-cli/src/lib.rs +++ b/adenosine-cli/src/lib.rs @@ -9,6 +9,7 @@ use std::str::FromStr; use std::time::Duration; pub mod identifiers; +use identifiers::Nsid; static APP_USER_AGENT: &str = concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION"),); @@ -57,7 +58,7 @@ impl XrpcClient { pub fn get( &self, - nsid: &str, + nsid: &Nsid, params: Option>, ) -> Result> { let params: HashMap = params.unwrap_or_default(); @@ -86,7 +87,7 @@ impl XrpcClient { pub fn get_to_writer( &self, - nsid: &str, + nsid: &Nsid, params: Option>, output: &mut W, ) -> Result { @@ -115,7 +116,7 @@ impl XrpcClient { pub fn post( &self, - nsid: &str, + nsid: &Nsid, params: Option>, body: Option, ) -> Result> { @@ -153,7 +154,7 @@ impl XrpcClient { pub fn post_cbor_from_reader( &self, - nsid: &str, + nsid: &Nsid, params: Option>, input: &mut R, ) -> Result> { -- cgit v1.2.3