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