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:
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user