mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-24 05:06:28 +00:00
fix: resolve all Clippy warnings across codebase - Fixed field reassignment warnings in ecstore/src/file_meta.rs by using struct initialization instead of default + field assignment - Fixed overly complex boolean expression in ecstore/src/utils/os/mod.rs by removing meaningless assertion - Replaced manual Default implementation with derive in crates/zip/src/lib.rs - Updated io::Error usage to use io::Error::other() instead of deprecated pattern - Removed useless assertions and clone-on-copy warnings - Fixed unwrap usage by replacing with expect() providing meaningful error messages - Fixed useless vec usage by using array repeat instead - All code now passes comprehensive Clippy check with --all-targets --all-features -- -D warnings
This commit is contained in:
@@ -40,7 +40,7 @@ use crate::{
|
||||
ListObjectsV2Info, MakeBucketOptions, MultipartUploadResult, ObjectInfo, ObjectOptions, ObjectToDelete, PartInfo,
|
||||
PutObjReader, StorageAPI,
|
||||
},
|
||||
store_init, utils,
|
||||
store_init,
|
||||
};
|
||||
|
||||
use common::error::{Error, Result};
|
||||
@@ -2695,17 +2695,17 @@ mod tests {
|
||||
// Test validation functions
|
||||
#[test]
|
||||
fn test_is_valid_object_name() {
|
||||
assert_eq!(is_valid_object_name("valid-object-name"), true);
|
||||
assert_eq!(is_valid_object_name(""), false);
|
||||
assert_eq!(is_valid_object_name("object/with/slashes"), true);
|
||||
assert_eq!(is_valid_object_name("object with spaces"), true);
|
||||
assert!(is_valid_object_name("valid-object-name"));
|
||||
assert!(!is_valid_object_name(""));
|
||||
assert!(is_valid_object_name("object/with/slashes"));
|
||||
assert!(is_valid_object_name("object with spaces"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_is_valid_object_prefix() {
|
||||
assert_eq!(is_valid_object_prefix("valid-prefix"), true);
|
||||
assert_eq!(is_valid_object_prefix(""), true);
|
||||
assert_eq!(is_valid_object_prefix("prefix/with/slashes"), true);
|
||||
assert!(is_valid_object_prefix("valid-prefix"));
|
||||
assert!(is_valid_object_prefix(""));
|
||||
assert!(is_valid_object_prefix("prefix/with/slashes"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user