fix: resolve clippy warnings in harvested PRs (needless-borrow, is_multiple_of, dead unwrap)
This commit is contained in:
@@ -3721,11 +3721,6 @@ mod speech_cli_tests {
|
||||
PathBuf::from("audio").join(default_speech_output_name("pcm")),
|
||||
PathBuf::from("audio").join("speech.pcm16")
|
||||
);
|
||||
assert_eq!(
|
||||
Some(PathBuf::from("custom.wav"))
|
||||
.unwrap_or_else(|| PathBuf::from(default_speech_output_name("mp3"))),
|
||||
PathBuf::from("custom.wav")
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -131,7 +131,7 @@ fn tool_loop_body(turn: usize, with_reasoning: bool) -> Vec<u8> {
|
||||
} else {
|
||||
""
|
||||
};
|
||||
let tool_name = if turn % 2 == 0 {
|
||||
let tool_name = if turn.is_multiple_of(2) {
|
||||
"read_file"
|
||||
} else {
|
||||
"write_file"
|
||||
@@ -301,7 +301,7 @@ fn compaction_must_cause_at_least_one_miss() {
|
||||
// Post-compaction: system prompt is truncated/changed.
|
||||
format!("You are a helpful assistant.\n\nUser: turn {turn}\nAssistant:")
|
||||
};
|
||||
cache.submit(&body.as_bytes());
|
||||
cache.submit(body.as_bytes());
|
||||
}
|
||||
|
||||
// After compaction, there should be at least one significant miss.
|
||||
|
||||
Reference in New Issue
Block a user