Skip to content

Commit

Permalink
chore: Fix warnings, remove unused IpldEq trait
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus23 committed Feb 14, 2024
1 parent c0cbc5d commit 92dc8cd
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 30 deletions.
1 change: 0 additions & 1 deletion wnfs-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ mod link;
mod metadata;
mod pathnodes;
mod storable;
mod traits;
pub mod utils;

pub use blockstore::*;
Expand Down
12 changes: 1 addition & 11 deletions wnfs-common/src/link.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{traits::IpldEq, utils::CondSync, BlockStore, Storable};
use crate::{utils::CondSync, BlockStore, Storable};
use anyhow::Result;
use async_once_cell::OnceCell;
use libipld::Cid;
Expand Down Expand Up @@ -136,16 +136,6 @@ impl<T: Storable + CondSync> Link<T> {
}
}

impl<T: PartialEq + Storable + CondSync> IpldEq for Link<T> {
async fn eq(&self, other: &Link<T>, store: &impl BlockStore) -> Result<bool> {
if self == other {
return Ok(true);
}

Ok(self.resolve_cid(store).await? == other.resolve_cid(store).await?)
}
}

impl<T: Storable> From<T> for Link<T> {
fn from(value: T) -> Self {
Self::Decoded { value }
Expand Down
17 changes: 0 additions & 17 deletions wnfs-common/src/traits.rs

This file was deleted.

2 changes: 1 addition & 1 deletion wnfs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ pub const WNFS_VERSION: semver::Version = semver::Version::new(1, 0, 0);
/// The result of an basic get operation.
pub(crate) enum SearchResult<T> {
Missing(T, usize),
NotADir(T, usize),
NotADir(T, #[allow(unused)] usize),
Found(T),
}

Expand Down

0 comments on commit 92dc8cd

Please sign in to comment.