From 5b44de207074403e9637d76318ccb45b05fed8ab Mon Sep 17 00:00:00 2001 From: "Aode (lion)" Date: Tue, 23 Nov 2021 16:31:15 -0600 Subject: [PATCH] clippy --- src/main.rs | 4 ++-- src/range.rs | 2 +- src/store/file_store/restructure.rs | 2 +- src/store/object_store.rs | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 604ca04..fe77c0f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -845,7 +845,7 @@ where config::Store::FileStore { path } => { let path = path.to_owned().unwrap_or_else(|| CONFIG.data_dir()); - let to = FileStore::build(path, &db)?; + let to = FileStore::build(path, db)?; manager.restructure(&to).await?; manager.migrate_store::(from, to).await?; @@ -868,7 +868,7 @@ where secret_key.clone(), security_token.clone(), session_token.clone(), - &db, + db, build_reqwest_client()?, )?; diff --git a/src/range.rs b/src/range.rs index 481533f..5467b06 100644 --- a/src/range.rs +++ b/src/range.rs @@ -96,7 +96,7 @@ impl Range { impl RangeHeader { pub(crate) fn single_bytes_range(&self) -> Option<&'_ Range> { if self.ranges.len() == 1 && self.unit == "bytes" { - self.ranges.iter().next() + self.ranges.get(0) } else { None } diff --git a/src/store/file_store/restructure.rs b/src/store/file_store/restructure.rs index 65309e2..81e990c 100644 --- a/src/store/file_store/restructure.rs +++ b/src/store/file_store/restructure.rs @@ -100,7 +100,7 @@ impl UploadManager { filename: &str, ) -> Result, Error> { let path = self - .generalize_path(&store, variant_process_path)? + .generalize_path(store, variant_process_path)? .strip_prefix("files")?; self.variant_key(path, filename) diff --git a/src/store/object_store.rs b/src/store/object_store.rs index d4d9ffa..d07f29a 100644 --- a/src/store/object_store.rs +++ b/src/store/object_store.rs @@ -153,6 +153,7 @@ impl Store for ObjectStore { } impl ObjectStore { + #[allow(clippy::too_many_arguments)] pub(crate) fn build( bucket_name: &str, region: Region,