Fix all compiler warnings across server and client

- Remove unused ServerConfig struct (config via CLI args)
- Remove unused otpks field from Database (not yet needed)
- Wire AppError into message routes with proper error propagation
- Remove unused imports in send.rs (Seed, MessageContent, etc.)
- Suppress dead_code on BundleResponse.fingerprint (needed by serde)

Zero warnings, 17/17 tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-03-26 22:16:11 +04:00
parent 60a7006ed9
commit 94b845eb5b
6 changed files with 25 additions and 29 deletions

View File

@@ -1,10 +1,12 @@
use axum::http::StatusCode;
use axum::response::{IntoResponse, Response};
/// Wraps anyhow::Error into an axum-compatible error response.
pub struct AppError(pub anyhow::Error);
impl IntoResponse for AppError {
fn into_response(self) -> Response {
tracing::error!("{:#}", self.0);
(StatusCode::INTERNAL_SERVER_ERROR, self.0.to_string()).into_response()
}
}
@@ -14,3 +16,6 @@ impl<E: Into<anyhow::Error>> From<E> for AppError {
AppError(err.into())
}
}
/// Convenience type for route handlers.
pub type AppResult<T> = Result<T, AppError>;