diff --git a/rust-toolchain.toml b/rust-toolchain.toml index e630049..eb39547 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.98.1" +channel = "1.99.0" profile = "minimal" components = ["clippy", "rustfmt"] diff --git a/src/config/models.rs b/src/config/models.rs index 3a36945..3b62fc9 100644 --- a/src/config/models.rs +++ b/src/config/models.rs @@ -1109,7 +1109,7 @@ mod tests { assert_eq!(app.process_name, expected_process_name); assert_eq!(app.exe_path, current_exe); assert!(app.enabled); // Should default to enabled - assert!(!app.display_name.is_empty()); // Should have a display name + assert_ne!(app.display_name, ""); // Should have a display name } #[test] @@ -1267,8 +1267,8 @@ mod tests { let app = result.unwrap(); // Should have basic metadata - assert!(!app.display_name.is_empty()); - assert!(!app.process_name.is_empty()); + assert_ne!(app.display_name, ""); + assert_ne!(app.process_name, ""); assert_eq!(app.exe_path, current_exe); } diff --git a/src/utils/icon_extractor.rs b/src/utils/icon_extractor.rs index d413494..812ea16 100644 --- a/src/utils/icon_extractor.rs +++ b/src/utils/icon_extractor.rs @@ -557,7 +557,7 @@ mod tests { let result = extract_display_name_from_exe(&path); assert!(result.is_ok()); let name = result.unwrap(); - assert!(!name.is_empty()); + assert_ne!(name, ""); } #[test] diff --git a/tests/memory_usage_test.rs b/tests/memory_usage_test.rs index 8568ec2..4b619b8 100644 --- a/tests/memory_usage_test.rs +++ b/tests/memory_usage_test.rs @@ -125,15 +125,9 @@ fn test_memory_stats_within_limits() { }; assert!(stats.is_within_limits()); - // Allow exact float comparison: values are constructed to be exact multiples - #[expect( - clippy::float_cmp, - reason = "Values are constructed as exact multiples of 1024*1024, so float comparison is precise" - )] - { - assert_eq!(stats.total_mb(), 40.0); - assert_eq!(stats.icon_cache_mb(), 5.0); - } + // Exact float comparison is precise: values are exact multiples of 1024*1024 + assert_eq!(stats.total_mb(), 40.0); + assert_eq!(stats.icon_cache_mb(), 5.0); } #[test] @@ -148,14 +142,8 @@ fn test_memory_stats_exceeds_limits() { }; assert!(!stats.is_within_limits()); - // Allow exact float comparison: value is constructed to be exact multiple - #[expect( - clippy::float_cmp, - reason = "Value is constructed as exact multiple of 1024*1024, so float comparison is precise" - )] - { - assert_eq!(stats.total_mb(), 60.0); - } + // Exact float comparison is precise: the value is an exact multiple of 1024*1024 + assert_eq!(stats.total_mb(), 60.0); } #[test]