chore(ipfs): clippies
assorted unused or idiomatic changes.
This commit is contained in:
parent
e9355bd498
commit
0927be1193
@ -51,7 +51,7 @@ where
|
||||
Ipld::String(string) => ser.serialize_str(string),
|
||||
Ipld::Bytes(bytes) => ser.serialize_bytes(bytes),
|
||||
Ipld::List(list) => {
|
||||
let wrapped = list.iter().map(|ipld| Wrapper(ipld));
|
||||
let wrapped = list.iter().map(Wrapper);
|
||||
ser.collect_seq(wrapped)
|
||||
}
|
||||
Ipld::Map(map) => {
|
||||
|
@ -33,7 +33,7 @@ pub async fn resolve(domain: &str) -> Result<IpfsPath, Error> {
|
||||
// previous implementation searched $domain and _dnslink.$domain concurrently. not sure did
|
||||
// `domain` assume fqdn names or not, but local suffices were not being searched on windows at
|
||||
// least. they are probably waste of time most of the time.
|
||||
for domain in searched.into_iter() {
|
||||
for domain in searched {
|
||||
let res = match resolver.txt_lookup(&*domain).await {
|
||||
Ok(res) => res,
|
||||
Err(e) => {
|
||||
@ -55,7 +55,7 @@ pub async fn resolve(domain: &str) -> Result<IpfsPath, Error> {
|
||||
.map(|suffix| {
|
||||
std::str::from_utf8(suffix)
|
||||
.map_err(Error::from)
|
||||
.and_then(|s| IpfsPath::from_str(s))
|
||||
.and_then(IpfsPath::from_str)
|
||||
});
|
||||
|
||||
if let Some(Ok(x)) = paths.next() {
|
||||
|
@ -6,7 +6,7 @@ use crate::error::Error;
|
||||
use async_trait::async_trait;
|
||||
use std::fs::File;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::{atomic::AtomicU64, Arc};
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::Semaphore;
|
||||
|
||||
use super::{BlockRm, BlockRmError, Column, DataStore, Lock, LockError, RepoCid};
|
||||
@ -41,9 +41,6 @@ pub struct FsDataStore {
|
||||
/// collection implementation, it might be needed to hold this permit for the duration of
|
||||
/// garbage collection, or something similar.
|
||||
lock: Arc<Semaphore>,
|
||||
|
||||
/// Not really needed
|
||||
written_bytes: AtomicU64,
|
||||
}
|
||||
|
||||
/// The column operations are all unimplemented pending at least downscoping of the
|
||||
@ -55,7 +52,6 @@ impl DataStore for FsDataStore {
|
||||
FsDataStore {
|
||||
path: root,
|
||||
lock: Arc::new(Semaphore::new(1)),
|
||||
written_bytes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user