Fix cargo clippy issues
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -34,7 +34,7 @@ pub async fn ws(
|
||||
if let Err(e) = tx.send(BroadcastMessage::StartSyncTaskForUser(
|
||||
auth.user.user_id.clone(),
|
||||
)) {
|
||||
log::error!("Failed to send StartSyncTaskForUser: {}", e);
|
||||
log::error!("Failed to send StartSyncTaskForUser: {e}");
|
||||
}
|
||||
|
||||
let rx = tx.subscribe();
|
||||
@@ -96,7 +96,7 @@ pub async fn ws_handler(
|
||||
// Send the message to the websocket
|
||||
if let Ok(msg) = serde_json::to_string(&WsMessage::Sync(*event)) {
|
||||
if let Err(e) = session.text(msg).await {
|
||||
log::error!("Failed to send SyncEvent: {}", e);
|
||||
log::error!("Failed to send SyncEvent: {e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -105,12 +105,12 @@ pub async fn home(
|
||||
|
||||
// Close sync task
|
||||
if let Err(e) = tx.send(BroadcastMessage::StopSyncTaskForUser(user.id.clone())) {
|
||||
log::error!("Failed to send StopSyncClientForUser: {}", e);
|
||||
log::error!("Failed to send StopSyncClientForUser: {e}");
|
||||
}
|
||||
|
||||
// Invalidate all Ws connections
|
||||
if let Err(e) = tx.send(BroadcastMessage::CloseAllUserSessions(user.id.clone())) {
|
||||
log::error!("Failed to send CloseAllUserSessions: {}", e);
|
||||
log::error!("Failed to send CloseAllUserSessions: {e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -145,7 +145,7 @@ pub async fn home(
|
||||
success_message = Some("The client was successfully deleted!".to_string());
|
||||
|
||||
if let Err(e) = tx.send(BroadcastMessage::CloseClientSession(delete_client_id)) {
|
||||
log::error!("Failed to send CloseClientSession: {}", e);
|
||||
log::error!("Failed to send CloseClientSession: {e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -215,7 +215,7 @@ pub async fn oidc_cb(session: Session, query: web::Query<AuthCallbackQuery>) ->
|
||||
name: user.name.unwrap_or("no_name".to_string()),
|
||||
email: user.email.unwrap_or("no@mail.com".to_string()),
|
||||
};
|
||||
log::info!("Successful authentication as {:?}", user);
|
||||
log::info!("Successful authentication as {user:?}");
|
||||
session.insert(USER_SESSION_KEY, user)?;
|
||||
|
||||
Ok(HttpResponse::Found()
|
||||
|
Reference in New Issue
Block a user