Skip to content
This repository was archived by the owner on Oct 23, 2022. It is now read-only.

Commit 502acea

Browse files
committed
cleanup: remove unused IpfsPath impls
Signed-off-by: ljedrz <ljedrz@gmail.com>
1 parent ab047e4 commit 502acea

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

src/path.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -132,30 +132,6 @@ impl<T: Into<PathRoot>> From<T> for IpfsPath {
132132
}
133133
}
134134

135-
// FIXME: get rid of this; it would mean that there must be a clone to retain the rest of the path.
136-
impl TryInto<Cid> for IpfsPath {
137-
type Error = Error;
138-
139-
fn try_into(self) -> Result<Cid, Self::Error> {
140-
match self.root().cid() {
141-
Some(cid) => Ok(cid.to_owned()),
142-
None => Err(anyhow::anyhow!("expected cid")),
143-
}
144-
}
145-
}
146-
147-
// FIXME: get rid of this; it would mean that there must be a clone to retain the rest of the path.
148-
impl TryInto<PeerId> for IpfsPath {
149-
type Error = Error;
150-
151-
fn try_into(self) -> Result<PeerId, Self::Error> {
152-
match self.root().peer_id() {
153-
Some(peer_id) => Ok(peer_id.to_owned()),
154-
None => Err(anyhow::anyhow!("expected peer id")),
155-
}
156-
}
157-
}
158-
159135
/// SlashedPath is internal to IpfsPath variants, and basically holds a unixfs-compatible path
160136
/// where segments do not contain slashes but can pretty much contain all other valid UTF-8.
161137
///

0 commit comments

Comments
 (0)