fix: resolve all clippy --all-targets warnings across 15 files

- gateway/mod.rs: move send_json before test module (items_after_test_module)
- memory/vector.rs: fix float_cmp, cast_precision_loss, approx_constant
- memory/chunker.rs: fix format_collect, format_push_string, write_with_newline
- memory/sqlite.rs: fix useless_vec
- heartbeat/engine.rs: fix format_collect, write_with_newline
- config/schema.rs: fix needless_raw_string_hashes
- tools/composio.rs: fix needless_raw_string_hashes
- integrations/registry.rs: fix uninlined_format_args, unused import
- tunnel/mod.rs: fix doc_markdown
- skills/mod.rs: allow similar_names in test module
- channels/cli.rs: fix unreadable_literal
- observability/mod.rs: fix manual_string_new
- runtime/mod.rs: fix manual_string_new
- examples/custom_memory.rs: add Default impl (new_without_default)
- examples/custom_channel.rs: fix needless_borrows_for_generic_args
This commit is contained in:
argenis de la rosa 2026-02-14 03:52:57 -05:00
parent 18582fe9c8
commit 1fd51f1984
15 changed files with 82 additions and 49 deletions

View file

@ -54,7 +54,7 @@ impl Channel for TelegramChannel {
async fn send(&self, message: &str, chat_id: &str) -> Result<()> {
self.client
.post(&self.api_url("sendMessage"))
.post(self.api_url("sendMessage"))
.json(&serde_json::json!({
"chat_id": chat_id,
"text": message,
@ -71,7 +71,7 @@ impl Channel for TelegramChannel {
loop {
let resp = self
.client
.get(&self.api_url("getUpdates"))
.get(self.api_url("getUpdates"))
.query(&[("offset", offset.to_string()), ("timeout", "30".into())])
.send()
.await?
@ -110,7 +110,7 @@ impl Channel for TelegramChannel {
async fn health_check(&self) -> bool {
self.client
.get(&self.api_url("getMe"))
.get(self.api_url("getMe"))
.send()
.await
.map(|r| r.status().is_success())

View file

@ -48,14 +48,20 @@ pub struct InMemoryBackend {
store: Mutex<HashMap<String, MemoryEntry>>,
}
impl InMemoryBackend {
pub fn new() -> Self {
impl Default for InMemoryBackend {
fn default() -> Self {
Self {
store: Mutex::new(HashMap::new()),
}
}
}
impl InMemoryBackend {
pub fn new() -> Self {
Self::default()
}
}
#[async_trait]
impl Memory for InMemoryBackend {
fn name(&self) -> &str {