diff --git a/src/api/mod.rs b/src/api/mod.rs index 7f5d508..c14c669 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -29,9 +29,6 @@ use tracing::info; #[derive(Error, Debug)] pub enum ApiError { - #[error("Not Implemented")] - NotImplemented, - #[error("Not Found")] NotFound, @@ -50,8 +47,6 @@ impl Into> for ApiError { info!("Converting Error {:?}", self); match self { // Todo Add Proper mappings - // ApiError::ParameterDeserialize => ErrorCode::InvalidParams, - ApiError::NotImplemented => ErrorCode::ServerError(0), _ => ErrorCode::InternalError, } .into() diff --git a/src/config_manager.rs b/src/config_manager.rs index ec6584e..86f0b52 100644 --- a/src/config_manager.rs +++ b/src/config_manager.rs @@ -37,7 +37,6 @@ pub struct ConfigManager { } pub struct ConfigTransaction<'a> { - finished: bool, shared_data: MutexGuard<'a, SharedData>, pub config: Config, } @@ -114,7 +113,6 @@ impl ConfigManager { let data = self.shared_data.lock().unwrap(); ConfigTransaction { - finished: false, config: data.pending_config.clone(), shared_data: data, } @@ -131,7 +129,7 @@ impl<'a> ConfigTransaction<'a> { Ok(()) } - pub fn revert(mut self) {} + pub fn revert(self) {} } fn read_file_to_config(path: &str) -> Result { diff --git a/src/main.rs b/src/main.rs index ed3b05b..020bd54 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -#![allow(dead_code)] +// #![allow(dead_code)] use std::{ collections::HashMap, diff --git a/src/web/auth.rs b/src/web/auth.rs index c34d2e5..208dc8a 100644 --- a/src/web/auth.rs +++ b/src/web/auth.rs @@ -1,6 +1,5 @@ use std::collections::HashMap; -use std::error::Error; -use std::hash::Hash; + use std::sync::{Arc, RwLock}; use uuid::Uuid; @@ -11,10 +10,9 @@ use serde::Deserialize; use tower_cookies::{Cookie, Cookies}; use axum::{ - extract::Extension, extract::State, http::{Request, StatusCode}, - middleware::{self, Next}, + middleware::Next, response::{IntoResponse, Response}, }; diff --git a/src/web/rpc.rs b/src/web/rpc.rs index f9155c8..0a8c21b 100644 --- a/src/web/rpc.rs +++ b/src/web/rpc.rs @@ -1,5 +1,4 @@ use crate::AppState; -use anyhow::Context; use axum::routing::post; use axum::{Json, Router}; use jsonrpsee::core::traits::ToRpcParams;