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

@@ -94,10 +94,7 @@ impl TokenStore for Database {
async fn get_token(&mut self) -> Option<JwtToken> {
self.with_settings(|settings| {
let token: Result<Option<JwtToken>> = settings.get(TOKEN_KEY);
match token {
Ok(data) => data,
Err(_) => None,
}
token.unwrap_or_default()
}).await
}

View File

@@ -47,6 +47,12 @@ pub struct MessageBuilder {
date: Option<NaiveDateTime>,
}
impl Default for MessageBuilder {
fn default() -> Self {
Self::new()
}
}
impl MessageBuilder {
pub fn new() -> Self {
Self {

View File

@@ -1,12 +1,10 @@
use crate::{
database::{Database, DatabaseAccess},
repository::Repository,
database::{Database, DatabaseAccess},
models::{
conversation::{Conversation, ConversationBuilder},
participant::Participant,
message::Message,
},
settings::Settings,
},
};
// Helper function to compare participants ignoring database IDs