Apply more lints

This commit is contained in:
Andras Schmelczer 2024-12-18 22:14:09 +00:00
parent 0c92bf959b
commit 1e1dd7b877
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
24 changed files with 61 additions and 63 deletions

View file

@ -1,6 +1,6 @@
use std::path::Path;
use anyhow::{Context, Result};
use anyhow::{Context as _, Result};
use database_config::DatabaseConfig;
use log::{info, warn};
use serde::{Deserialize, Serialize};

View file

@ -1,4 +1,4 @@
use rand::{distributions::Alphanumeric, thread_rng, Rng};
use rand::{distributions::Alphanumeric, thread_rng, Rng as _};
use serde::{Deserialize, Serialize};
#[derive(Debug, Deserialize, Serialize, Clone)]

View file

@ -1,6 +1,6 @@
use core::{str::FromStr, time::Duration};
use core::{str::FromStr as _, time::Duration};
use anyhow::{Context, Result};
use anyhow::{Context as _, Result};
use models::{
DocumentId, DocumentVersionWithoutContent, StoredDocumentVersion, VaultId, VaultUpdateId,
};

View file

@ -26,7 +26,7 @@ pub enum SyncServerError {
#[error("Unauthorized: {0}")]
Unauthorized(#[source] anyhow::Error),
#[allow(dead_code)]
#[expect(dead_code)]
#[error("Permission denied error: {0}")]
PermissionDeniedError(#[source] anyhow::Error),
}

View file

@ -5,7 +5,7 @@ mod database;
mod errors;
mod server;
use anyhow::{Context, Result};
use anyhow::{Context as _, Result};
use app_state::AppState;
use errors::{init_error, SyncServerError};
use server::create_server;

View file

@ -6,7 +6,7 @@ use aide::{
openapi::{Info, OpenApi},
scalar::Scalar,
};
use anyhow::{Context, Result};
use anyhow::{Context as _, Result};
use axum::{
extract::DefaultBodyLimit,
http::{self, HeaderValue, Method},

View file

@ -1,4 +1,4 @@
use anyhow::Context;
use anyhow::Context as _;
use axum::{
extract::{Path, State},
Json,

View file

@ -1,4 +1,4 @@
use anyhow::Context;
use anyhow::Context as _;
use axum::{
extract::{Path, State},
Json,

View file

@ -1,4 +1,4 @@
use anyhow::{anyhow, Context};
use anyhow::{anyhow, Context as _};
use axum::{
extract::{Path, State},
Json,