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:
安正超
2025-05-28 11:00:07 +08:00
parent 96d0155bcc
commit a1f4abf6c3
37 changed files with 309 additions and 255 deletions
+4 -3
View File
@@ -76,12 +76,13 @@ mod tests {
let config = ObservabilityConfig::new();
// Test OTEL default values
if let Some(use_stdout) = config.otel.use_stdout {
assert!(use_stdout == true || use_stdout == false, "use_stdout should be a valid boolean");
if let Some(_use_stdout) = config.otel.use_stdout {
// Test boolean values - any boolean value is valid
// assert!(use_stdout || !use_stdout, "use_stdout should be a valid boolean");
}
if let Some(sample_ratio) = config.otel.sample_ratio {
assert!(sample_ratio >= 0.0 && sample_ratio <= 1.0, "Sample ratio should be between 0.0 and 1.0");
assert!((0.0..=1.0).contains(&sample_ratio), "Sample ratio should be between 0.0 and 1.0");
}
if let Some(meter_interval) = config.otel.meter_interval {