Private
Public Access
1
0

cargo clippy/fix

This commit is contained in:
2025-04-28 16:06:51 -07:00
parent c189e5f9e3
commit e7d837d68c
13 changed files with 43 additions and 61 deletions

View File

@@ -182,7 +182,7 @@ impl Daemon {
// Fetch conversations from server
let fetched_conversations = client.get_conversations().await?;
let db_conversations: Vec<kordophone_db::models::Conversation> = fetched_conversations.into_iter()
.map(|c| kordophone_db::models::Conversation::from(c))
.map(kordophone_db::models::Conversation::from)
.collect();
// Process each conversation
@@ -205,7 +205,7 @@ impl Daemon {
let messages = client.get_messages(&conversation_id, None, None, last_message_id).await?;
let db_messages: Vec<kordophone_db::models::Message> = messages.into_iter()
.map(|m| kordophone_db::models::Message::from(m))
.map(kordophone_db::models::Message::from)
.collect();
// Insert each message
@@ -221,8 +221,7 @@ impl Daemon {
}
async fn get_settings(&mut self) -> Result<Settings> {
let settings = self.database.with_settings(|s|
Settings::from_db(s)
let settings = self.database.with_settings(Settings::from_db
).await?;
Ok(settings)
@@ -237,8 +236,7 @@ impl Daemon {
}
async fn get_client_impl(database: &mut Arc<Mutex<Database>>) -> Result<HTTPAPIClient<DatabaseTokenStore>> {
let settings = database.with_settings(|s|
Settings::from_db(s)
let settings = database.with_settings(Settings::from_db
).await?;
let server_url = settings.server_url