Skip to content

Commit ee4199f

Browse files
committed
fix lints
1 parent 263edb8 commit ee4199f

File tree

2 files changed

+7
-21
lines changed

2 files changed

+7
-21
lines changed

crates/rullm-cli/src/cli_client.rs

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,12 @@ use std::pin::Pin;
1212

1313
/// Simple configuration for CLI adapter
1414
#[derive(Debug, Clone)]
15+
#[derive(Default)]
1516
pub struct CliConfig {
1617
pub temperature: Option<f32>,
1718
pub max_tokens: Option<u32>,
1819
}
1920

20-
impl Default for CliConfig {
21-
fn default() -> Self {
22-
Self {
23-
temperature: None,
24-
max_tokens: None,
25-
}
26-
}
27-
}
2821

2922
/// CLI adapter enum that wraps concrete provider clients
3023
pub enum CliClient {
@@ -347,18 +340,11 @@ impl CliClient {
347340
let stream = client.messages_stream(request).await?;
348341
Ok(Box::pin(stream.filter_map(|event_result| async move {
349342
match event_result {
350-
Ok(event) => match event {
351-
rullm_core::providers::anthropic::StreamEvent::ContentBlockDelta {
352-
delta,
353-
..
354-
} => match delta {
355-
rullm_core::providers::anthropic::Delta::TextDelta { text } => {
356-
Some(Ok(text))
357-
}
358-
_ => None,
359-
},
360-
_ => None,
361-
},
343+
Ok(rullm_core::providers::anthropic::StreamEvent::ContentBlockDelta {
344+
delta: rullm_core::providers::anthropic::Delta::TextDelta { text },
345+
..
346+
}) => Some(Ok(text)),
347+
Ok(_) => None,
362348
Err(e) => Some(Err(e)),
363349
}
364350
})))

crates/rullm-core/src/providers/google/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ impl GoogleClient {
186186
.filter_map(|m| {
187187
m.get("name")
188188
.and_then(|v| v.as_str())
189-
.map(|s| s.split('/').last().unwrap_or(s).to_string())
189+
.map(|s| s.split('/').next_back().unwrap_or(s).to_string())
190190
})
191191
.collect();
192192

0 commit comments

Comments
 (0)