Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
DrChat committed Jan 18, 2025
1 parent e52792b commit 60adc4a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 203 deletions.
185 changes: 3 additions & 182 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions atrium-repo/src/mst.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ use std::{cmp::Ordering, collections::HashSet, convert::Infallible};

use async_stream::try_stream;
use futures::{Stream, StreamExt};
use ipld_core::{
cid::{multihash::Multihash, Cid},
ipld::Ipld,
};
use ipld_core::{cid::Cid, ipld::Ipld};
use serde::{Deserialize, Serialize};
use sha2::Digest;

Expand Down
20 changes: 3 additions & 17 deletions atrium-repo/src/repo.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
use atrium_api::types::{
string::{Did, Nsid, RecordKey, Tid},
string::{Did, Tid},
Collection,
};
use ipld_core::{cid::Cid, ipld::Ipld};
use serde::{Deserialize, Serialize};
use sha2::Digest;

use crate::{
blockstore::{self, AsyncBlockStoreRead},
mst,
};
use crate::{blockstore::AsyncBlockStoreRead, mst};

mod schema {
use super::*;
Expand Down Expand Up @@ -155,17 +152,6 @@ impl<R: AsyncBlockStoreRead> Repository<R> {
}
}

#[inline(always)]
fn fmt_prefix(nsid: Nsid) -> String {
let mut prefix: String = nsid.into();
prefix.push('/');
prefix
}

fn parse_recordkey(key: &str) -> Result<RecordKey, Error> {
key.parse::<RecordKey>().map_err(Error::InvalidRecordKey)
}

/// Errors that can occur while interacting with a repository.
#[derive(Debug, thiserror::Error)]
pub enum Error {
Expand All @@ -183,8 +169,8 @@ pub enum Error {

#[cfg(test)]
mod test {
use crate::blockstore::CarStore;
use atrium_api::types::Object;
use blockstore::CarStore;

use super::*;

Expand Down

0 comments on commit 60adc4a

Please sign in to comment.