Skip to content

Commit 07161a5

Browse files
committed
fix lints
1 parent 263edb8 commit 07161a5

File tree

2 files changed

+7
-23
lines changed

2 files changed

+7
-23
lines changed

crates/rullm-cli/src/cli_client.rs

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,12 @@ use rullm_core::providers::{AnthropicClient, GoogleClient, OpenAIClient};
1111
use std::pin::Pin;
1212

1313
/// Simple configuration for CLI adapter
14-
#[derive(Debug, Clone)]
14+
#[derive(Debug, Clone, Default)]
1515
pub struct CliConfig {
1616
pub temperature: Option<f32>,
1717
pub max_tokens: Option<u32>,
1818
}
1919

20-
impl Default for CliConfig {
21-
fn default() -> Self {
22-
Self {
23-
temperature: None,
24-
max_tokens: None,
25-
}
26-
}
27-
}
28-
2920
/// CLI adapter enum that wraps concrete provider clients
3021
pub enum CliClient {
3122
OpenAI {
@@ -347,18 +338,11 @@ impl CliClient {
347338
let stream = client.messages_stream(request).await?;
348339
Ok(Box::pin(stream.filter_map(|event_result| async move {
349340
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-
},
341+
Ok(rullm_core::providers::anthropic::StreamEvent::ContentBlockDelta {
342+
delta: rullm_core::providers::anthropic::Delta::TextDelta { text },
343+
..
344+
}) => Some(Ok(text)),
345+
Ok(_) => None,
362346
Err(e) => Some(Err(e)),
363347
}
364348
})))

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)