diff --git a/Cargo.toml b/Cargo.toml index 68c2de9a..617a2a33 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ http = "0.2.9" hyper = { version = "0.14.27", features = ["full"] } lazy_static = "1.4.0" md5 = "0.7.0" -multimap = "0.9.0" +multimap = "0.10.0" os_info = "3.7.0" rand = "0.8.5" regex = "1.9.4" diff --git a/src/lib.rs b/src/lib.rs index b0e6bae9..bafe378c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,4 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(clippy::tabs_in_doc_comments)] +#![allow(clippy::result_large_err)] +#![allow(clippy::too_many_arguments)] pub mod s3; diff --git a/src/s3/client.rs b/src/s3/client.rs index 46d5c30d..8b87ac3b 100644 --- a/src/s3/client.rs +++ b/src/s3/client.rs @@ -35,12 +35,10 @@ use async_recursion::async_recursion; use bytes::{Buf, Bytes}; use dashmap::DashMap; use hyper::http::Method; -use os_info; use reqwest::header::HeaderMap; use std::collections::HashMap; use std::fs::File; use std::io::prelude::*; -use std::io::Read; use std::path::{Path, PathBuf}; use std::sync::Arc; use xmltree::Element; @@ -48,9 +46,6 @@ use xmltree::Element; mod list_objects; mod listen_bucket_notification; -pub use list_objects::*; -pub use listen_bucket_notification::*; - /// Client Builder manufactures a Client using given parameters. #[derive(Debug, Default)] pub struct ClientBuilder { @@ -706,7 +701,7 @@ impl Client { async fn calculate_part_count<'a>( &self, - sources: &'a mut Vec>, + sources: &'a mut [ComposeSource<'_>], ) -> Result { let mut object_size = 0_usize; let mut i = 0; diff --git a/src/s3/client/listen_bucket_notification.rs b/src/s3/client/listen_bucket_notification.rs index 881cd68a..e58c800b 100644 --- a/src/s3/client/listen_bucket_notification.rs +++ b/src/s3/client/listen_bucket_notification.rs @@ -117,7 +117,7 @@ impl Client { continue; } let records_res: Result = - serde_json::from_str(&s).map_err(|e| e.into()); + serde_json::from_str(s).map_err(|e| e.into()); return Some((records_res, reader)); } Err(e) => return Some((Err(e.into()), reader)), diff --git a/src/s3/http.rs b/src/s3/http.rs index 008c9bfd..deb7b146 100644 --- a/src/s3/http.rs +++ b/src/s3/http.rs @@ -417,8 +417,7 @@ impl BaseUrl { host: self.host.clone(), port: self.port, path: String::from("/"), - query: query.clone(), - ..Default::default() + query: query.clone() }; if bucket_name.is_none() { diff --git a/tests/start-server.sh b/tests/start-server.sh index 0a3d3307..741747e8 100755 --- a/tests/start-server.sh +++ b/tests/start-server.sh @@ -1,5 +1,7 @@ #!/bin/bash +#Note start this script from minio-rs, not from directory tests + set -x set -e