Fix all clippy warnings across workspace

collapsible_if, let-chains, derivable_impls, clone_on_copy, useless_vec, approx_constant, io_other_error, single_match, collapsible_match, unnecessary_map_or, manual_is_multiple_of, result_large_err, too_many_arguments, upper_case_acronyms

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-06-12 21:09:47 +08:00
parent ab1c5882d1
commit a2c7c0fa71
16 changed files with 82 additions and 131 deletions

View File

@@ -72,16 +72,13 @@ async fn session_multiple_reads() {
let mut texts = Vec::new();
tokio::time::timeout(Duration::from_secs(5), async {
loop {
match rx.recv().await.unwrap() {
SessionEvent::Data(_, entry) => {
if let DecodedData::Text(s) = entry.data {
texts.push(s);
if texts.len() == 3 {
break;
}
}
if let SessionEvent::Data(_, entry) = rx.recv().await.unwrap()
&& let DecodedData::Text(s) = entry.data
{
texts.push(s);
if texts.len() == 3 {
break;
}
_ => {}
}
}
})
@@ -127,14 +124,11 @@ async fn session_multi_pipeline_text_and_hex() {
let mut results = Vec::new();
tokio::time::timeout(Duration::from_secs(5), async {
loop {
match rx.recv().await.unwrap() {
SessionEvent::Data(_, entry) => {
results.push((entry.pipeline_name.clone(), entry.data.clone()));
if results.len() == 2 {
break;
}
if let SessionEvent::Data(_, entry) = rx.recv().await.unwrap() {
results.push((entry.pipeline_name.clone(), entry.data.clone()));
if results.len() == 2 {
break;
}
_ => {}
}
}
})