diff --git a/src/operation_dispatcher.rs b/src/operation_dispatcher.rs index c9c6b0ce..fcfeca4e 100644 --- a/src/operation_dispatcher.rs +++ b/src/operation_dispatcher.rs @@ -10,7 +10,6 @@ use std::collections::HashMap; use std::rc::Rc; use std::time::Duration; -#[allow(dead_code)] #[derive(PartialEq, Debug, Clone, Copy)] pub(crate) enum State { Pending, @@ -18,7 +17,6 @@ pub(crate) enum State { Done, } -#[allow(dead_code)] impl State { fn next(&mut self) { match self { @@ -33,7 +31,6 @@ impl State { } } -#[allow(dead_code)] #[derive(Clone)] pub(crate) struct Operation { state: RefCell, @@ -46,7 +43,6 @@ pub(crate) struct Operation { grpc_message_build_fn: GrpcMessageBuildFn, } -#[allow(dead_code)] impl Operation { pub fn new(extension: Rc, action: Action, service: Rc) -> Self { Self { @@ -105,14 +101,12 @@ impl Operation { } } -#[allow(dead_code)] pub struct OperationDispatcher { operations: Vec>, waiting_operations: HashMap>, service_handlers: HashMap>, } -#[allow(dead_code)] impl OperationDispatcher { pub fn default() -> Self { OperationDispatcher { @@ -152,12 +146,6 @@ impl OperationDispatcher { self.operations.extend(operations); } - pub fn get_current_operation_state(&self) -> Option { - self.operations - .first() - .map(|operation| operation.get_state()) - } - pub fn next(&mut self) -> Option> { if let Some((i, operation)) = self.operations.iter_mut().enumerate().next() { match operation.get_state() { diff --git a/src/service.rs b/src/service.rs index 9e988a1a..423501df 100644 --- a/src/service.rs +++ b/src/service.rs @@ -2,7 +2,7 @@ pub(crate) mod auth; pub(crate) mod grpc_message; pub(crate) mod rate_limit; -use crate::configuration::{Action, Extension, ExtensionType, FailureMode}; +use crate::configuration::{Action, Extension, ExtensionType}; use crate::service::auth::{AUTH_METHOD_NAME, AUTH_SERVICE_NAME}; use crate::service::grpc_message::GrpcMessageRequest; use crate::service::rate_limit::{RATELIMIT_METHOD_NAME, RATELIMIT_SERVICE_NAME}; @@ -15,7 +15,6 @@ use std::time::Duration; #[derive(Default)] pub struct GrpcService { - #[allow(dead_code)] extension: Rc, name: &'static str, method: &'static str, @@ -46,10 +45,6 @@ impl GrpcService { fn method(&self) -> &str { self.method } - #[allow(dead_code)] - pub fn failure_mode(&self) -> &FailureMode { - &self.extension.failure_mode - } } pub type GrpcCallFn = fn(