Skip to content

Commit 1defe1b

Browse files
konardclaude
andcommitted
Fix additional clippy warnings
- tests/claude_tests.rs: Remove unnecessary reference in comparison - tests/qwen_tests.rs: Replace collect+is_empty with any() for cleaner code Both fixes address clippy warnings that are treated as errors with -Dwarnings. Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 68e2171 commit 1defe1b

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

rust/tests/claude_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fn test_build_args_uses_stream_json_format() {
6767
assert!(args.contains(&"stream-json".to_string()));
6868
assert!(!args
6969
.iter()
70-
.filter(|a| *a != &"stream-json")
70+
.filter(|a| *a != "stream-json")
7171
.any(|a| a == "json"));
7272
}
7373

rust/tests/qwen_tests.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,7 @@ fn test_build_args_with_include_directories() {
108108
..QwenBuildOptions::new()
109109
};
110110
let args = build_args(&options);
111-
let dir_indices: Vec<usize> = args
112-
.iter()
113-
.enumerate()
114-
.filter(|(_, a)| *a == "--include-directories")
115-
.map(|(i, _)| i)
116-
.collect();
117-
assert!(!dir_indices.is_empty());
111+
assert!(args.iter().any(|a| a == "--include-directories"));
118112
assert!(args.contains(&"src".to_string()));
119113
assert!(args.contains(&"lib".to_string()));
120114
}

0 commit comments

Comments
 (0)