fix: must_use

This commit is contained in:
houseme
2025-05-30 15:11:51 +08:00
parent 004b6945f2
commit 7f983e72e7
4 changed files with 3 additions and 1 deletions

1
Cargo.lock generated
View File

@@ -7749,6 +7749,7 @@ dependencies = [
"async-trait",
"chrono",
"flexi_logger",
"lazy_static",
"nu-ansi-term 0.50.1",
"nvml-wrapper",
"opentelemetry",

View File

@@ -21,6 +21,7 @@ rustfs-config = { workspace = true }
async-trait = { workspace = true }
chrono = { workspace = true }
flexi_logger = { workspace = true, features = ["trc", "kv"] }
lazy_static = { workspace = true }
nu-ansi-term = { workspace = true }
nvml-wrapper = { workspace = true, optional = true }
opentelemetry = { workspace = true }

View File

@@ -1195,7 +1195,6 @@ impl DiskAPI for LocalDisk {
}
#[tracing::instrument(skip(self))]
#[must_use]
async fn read_all(&self, volume: &str, path: &str) -> Result<Vec<u8>> {
if volume == RUSTFS_META_BUCKET && path == super::FORMAT_CONFIG_FILE {
let format_info = self.format_info.read().await;

View File

@@ -501,6 +501,7 @@ pub trait DiskAPI: Debug + Send + Sync + 'static {
async fn read_multiple(&self, req: ReadMultipleReq) -> Result<Vec<ReadMultipleResp>>;
// CleanAbandonedData
async fn write_all(&self, volume: &str, path: &str, data: Vec<u8>) -> Result<()>;
#[must_use]
async fn read_all(&self, volume: &str, path: &str) -> Result<Vec<u8>>;
async fn disk_info(&self, opts: &DiskInfoOptions) -> Result<DiskInfo>;
async fn ns_scanner(