diff options
author | Julius Michaelis <gitter@liftm.de> | 2020-11-01 18:33:30 +0900 |
---|---|---|
committer | Julius Michaelis <gitter@liftm.de> | 2020-11-01 18:33:30 +0900 |
commit | 61c5b741eb3d6a02f075c6da2ce93d715d16f446 (patch) | |
tree | 9dd5560a65a78a44d8dd3cda41669a07d869967a | |
parent | eabde517363495d4f5c2962cce61878c3d047593 (diff) |
make path to IpfsClient::ls non-optional to match spec and ls_with_options
-rw-r--r-- | ipfs-api/src/client/internal.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ipfs-api/src/client/internal.rs b/ipfs-api/src/client/internal.rs index 607f4c1..1b544ee 100644 --- a/ipfs-api/src/client/internal.rs +++ b/ipfs-api/src/client/internal.rs @@ -1942,16 +1942,14 @@ impl IpfsClient { /// use ipfs_api::IpfsClient; /// /// let client = IpfsClient::default(); - /// let res = client.ls(Some("/ipfs/QmVrLsEDn27sScp3k23sgZNefVTjSAL3wpgW1iWPi4MgoY")); + /// let res = client.ls("/ipfs/QmVrLsEDn27sScp3k23sgZNefVTjSAL3wpgW1iWPi4MgoY"); /// ``` /// #[inline] - pub async fn ls(&self, path: Option<&str>) -> Result<response::LsResponse, Error> { + pub async fn ls(&self, path: &str) -> Result<response::LsResponse, Error> { self.request(request::Ls { - path: path.expect("Path is not actually optional"), - stream: None, - resolve_type: None, - size: None, + path: path, + .. Default::default() }, None).await } |