notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 80f02d829a767df6841d1f1ddbe18f72a2144d6c
parent 0b4807f62d0366c9b3f49b9154f03b46d6a60340
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 25 Mar 2025 19:35:10 -0700

clippy fixes

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mcrates/notedeck_dave/src/avatar.rs | 4++--
Mcrates/notedeck_dave/src/lib.rs | 10+++++-----
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/crates/notedeck_dave/src/avatar.rs b/crates/notedeck_dave/src/avatar.rs @@ -366,9 +366,9 @@ fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> { #[inline] fn apply_friction(val: f32, friction: f32, clamp: f32) -> f32 { if val < clamp { - return 0.0; + 0.0 } else { - return val * friction; + val * friction } } diff --git a/crates/notedeck_dave/src/lib.rs b/crates/notedeck_dave/src/lib.rs @@ -266,7 +266,7 @@ impl SearchCall { .limit(limit as u64) .build(); let notes = { - if let Ok(results) = ndb.query(&txn, &[filter], limit) { + if let Ok(results) = ndb.query(txn, &[filter], limit) { results.into_iter().map(|r| r.note_key.as_u64()).collect() } else { vec![] @@ -395,7 +395,7 @@ impl Dave { // have a debug option to show this } Message::ToolCalls(toolcalls) => { - Self::tool_call_ui(&toolcalls, ui); + Self::tool_call_ui(toolcalls, ui); } } } @@ -526,7 +526,7 @@ impl Dave { entry .arguments .get_or_insert_with(String::new) - .push_str(&argchunk); + .push_str(argchunk); } } } @@ -539,7 +539,7 @@ impl Dave { } let mut parsed_tool_calls = vec![]; - for (_index, partial) in &all_tool_calls { + for (_index, partial) in all_tool_calls { let Some(unknown_tool_call) = partial.complete() else { tracing::error!("could not complete partial tool call: {:?}", partial); continue; @@ -652,7 +652,7 @@ impl Tool { "enum".to_string(), Value::Array( enums - .into_iter() + .iter() .map(|s| Value::String((*s).to_owned())) .collect(), ),