diff --git a/ecstore/src/io.rs b/ecstore/src/io.rs index e1ed0b48d..7c1493455 100644 --- a/ecstore/src/io.rs +++ b/ecstore/src/io.rs @@ -5,10 +5,7 @@ use std::task::{Context, Poll}; use tokio::fs::File; use tokio::io::{self, AsyncRead, AsyncWrite, ReadBuf}; -#[derive(Default)] pub enum Reader { - #[default] - NotUse, File(File), Buffer(VecAsyncReader), } @@ -18,7 +15,6 @@ impl AsyncRead for Reader { match self.get_mut() { Reader::File(file) => Pin::new(file).poll_read(cx, buf), Reader::Buffer(buffer) => Pin::new(buffer).poll_read(cx, buf), - Reader::NotUse => Poll::Ready(Ok(())), } } } @@ -203,7 +199,7 @@ impl VecAsyncReader { // Implementing AsyncRead trait for VecAsyncReader impl AsyncRead for VecAsyncReader { - fn poll_read(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut ReadBuf) -> Poll> { + fn poll_read(self: Pin<&mut Self>, _cx: &mut Context<'_>, buf: &mut ReadBuf) -> Poll> { let this = self.get_mut(); // Check how many bytes are available to read diff --git a/ecstore/src/notification_sys.rs b/ecstore/src/notification_sys.rs index 063db66b9..c0b2463bd 100644 --- a/ecstore/src/notification_sys.rs +++ b/ecstore/src/notification_sys.rs @@ -46,7 +46,7 @@ pub struct NotificationPeerErr { } impl NotificationSys { - pub fn rest_client_from_hash(&self, s: &str) -> Option { + pub fn rest_client_from_hash(&self, _s: &str) -> Option { None } pub async fn delete_policy(&self) -> Vec { diff --git a/ecstore/src/set_disk.rs b/ecstore/src/set_disk.rs index cd170d907..962c9a7c4 100644 --- a/ecstore/src/set_disk.rs +++ b/ecstore/src/set_disk.rs @@ -6,6 +6,7 @@ use std::{ time::Duration, }; +use crate::heal::heal_ops::{HealEntryFn, HealSequence}; use crate::{ bitrot::{bitrot_verify, close_bitrot_writers, new_bitrot_filereader, new_bitrot_filewriter, BitrotFileWriter}, cache_value::metacache_set::{list_path_raw, ListPathRawOptions}, @@ -16,8 +17,8 @@ use crate::{ format::FormatV3, new_disk, BufferReader, BufferWriter, CheckPartsResp, DeleteOptions, DiskAPI, DiskInfo, DiskInfoOptions, DiskOption, DiskStore, FileInfoVersions, FileReader, FileWriter, MetaCacheEntries, MetaCacheEntry, MetadataResolutionParams, - ReadMultipleReq, ReadMultipleResp, ReadOptions, UpdateMetadataOpts, WalkDirOptions, RUSTFS_META_BUCKET, - RUSTFS_META_MULTIPART_BUCKET, RUSTFS_META_TMP_BUCKET, + ReadMultipleReq, ReadMultipleResp, ReadOptions, UpdateMetadataOpts, RUSTFS_META_BUCKET, RUSTFS_META_MULTIPART_BUCKET, + RUSTFS_META_TMP_BUCKET, }, erasure::Erasure, error::{Error, Result}, @@ -55,10 +56,6 @@ use crate::{ heal::data_scanner::{globalHealConfig, HEAL_DELETE_DANGLING}, store_api::ListObjectVersionsInfo, }; -use crate::{ - heal::heal_ops::{HealEntryFn, HealSequence}, - io::Writer, -}; use futures::future::join_all; use glob::Pattern; use http::HeaderMap; diff --git a/ecstore/src/store_list_objects.rs b/ecstore/src/store_list_objects.rs index 6db2c5cb9..f7b185d84 100644 --- a/ecstore/src/store_list_objects.rs +++ b/ecstore/src/store_list_objects.rs @@ -17,7 +17,7 @@ use std::io::ErrorKind; use std::sync::Arc; use tokio::sync::broadcast::{self, Receiver as B_Receiver}; use tokio::sync::mpsc::{self, Receiver, Sender}; -use tracing::{error, warn}; +use tracing::error; const MAX_OBJECT_LIST: i32 = 1000; // const MAX_DELETE_LIST: i32 = 1000;