cargo clippy/fix
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user