mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-27 15:37:02 +00:00
clippy
This commit is contained in:
@@ -50,8 +50,6 @@ use path_absolutize::Absolutize;
|
|||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
use std::io::Cursor;
|
use std::io::Cursor;
|
||||||
#[cfg(target_family = "unix")]
|
|
||||||
use std::os::unix::fs::MetadataExt;
|
|
||||||
use std::sync::atomic::{AtomicU32, Ordering};
|
use std::sync::atomic::{AtomicU32, Ordering};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::{Duration, SystemTime};
|
use std::time::{Duration, SystemTime};
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
use crate::config::error::ConfigError;
|
|
||||||
use crate::{disk::error::DiskError, error::Error};
|
use crate::{disk::error::DiskError, error::Error};
|
||||||
use std::{collections::HashMap, fmt::Debug};
|
use std::{collections::HashMap, fmt::Debug};
|
||||||
// pub type CheckErrorFn = fn(e: &Error) -> bool;
|
// pub type CheckErrorFn = fn(e: &Error) -> bool;
|
||||||
|
|||||||
@@ -3527,8 +3527,8 @@ impl ObjectIO for SetDisks {
|
|||||||
// let disks = disks.clone();
|
// let disks = disks.clone();
|
||||||
let bucket = String::from(bucket);
|
let bucket = String::from(bucket);
|
||||||
let object = String::from(object);
|
let object = String::from(object);
|
||||||
let set_index = self.set_index.clone();
|
let set_index = self.set_index;
|
||||||
let pool_index = self.pool_index.clone();
|
let pool_index = self.pool_index;
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
if let Err(e) = Self::get_object_with_fileinfo(
|
if let Err(e) = Self::get_object_with_fileinfo(
|
||||||
&bucket, &object, offset, length, &mut wd, fi, files, &disks, set_index, pool_index,
|
&bucket, &object, offset, length, &mut wd, fi, files, &disks, set_index, pool_index,
|
||||||
@@ -5271,7 +5271,7 @@ fn get_complete_multipart_md5(parts: &[CompletePart]) -> String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let mut hasher = Md5::new();
|
let mut hasher = Md5::new();
|
||||||
hasher.write(&buf);
|
let _ = hasher.write(&buf);
|
||||||
|
|
||||||
format!("{:x}-{}", hasher.finalize(), parts.len())
|
format!("{:x}-{}", hasher.finalize(), parts.len())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ use std::{
|
|||||||
fmt::Debug,
|
fmt::Debug,
|
||||||
};
|
};
|
||||||
|
|
||||||
use tracing::{debug, info, warn};
|
use tracing::{debug, warn};
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
pub async fn init_disks(eps: &Endpoints, opt: &DiskOption) -> (Vec<Option<DiskStore>>, Vec<Option<Error>>) {
|
pub async fn init_disks(eps: &Endpoints, opt: &DiskOption) -> (Vec<Option<DiskStore>>, Vec<Option<Error>>) {
|
||||||
|
|||||||
@@ -391,7 +391,7 @@ impl S3 for FS {
|
|||||||
.await
|
.await
|
||||||
.map_err(to_s3_error)?;
|
.map_err(to_s3_error)?;
|
||||||
|
|
||||||
warn!("head_object info {:?}", &info);
|
// warn!("head_object info {:?}", &info);
|
||||||
|
|
||||||
let content_type = {
|
let content_type = {
|
||||||
if let Some(content_type) = info.content_type {
|
if let Some(content_type) = info.content_type {
|
||||||
|
|||||||
Reference in New Issue
Block a user