Skip to content

Commit

Permalink
[tmp] Allowing dead code
Browse files Browse the repository at this point in the history
Signed-off-by: dd di cesare <[email protected]>
  • Loading branch information
didierofrivia committed Sep 2, 2024
1 parent 82fd22e commit 62b11bf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/action_dispatcher.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
use proxy_wasm::types::Status;
use std::cell::RefCell;

#[allow(dead_code)]
#[derive(PartialEq, Debug, Clone)]
pub(crate) enum State {
Pending,
Waiting,
Done,
}

#[allow(dead_code)]
impl State {
fn next(&mut self) {
match self {
Expand All @@ -17,13 +19,16 @@ impl State {
}
}
}

#[allow(dead_code)]
#[derive(Clone)]
pub(crate) struct Action {
state: State,
result: Result<u32, Status>,
operation: Option<fn() -> Result<u32, Status>>,
}

#[allow(dead_code)]
impl Action {
pub fn default() -> Self {
Self {
Expand Down Expand Up @@ -54,10 +59,12 @@ impl Action {
}
}

#[allow(dead_code)]
pub struct ActionDispatcher {
actions: RefCell<Vec<Action>>,
}

#[allow(dead_code)]
impl ActionDispatcher {
pub fn default() -> ActionDispatcher {
ActionDispatcher {
Expand Down

0 comments on commit 62b11bf

Please sign in to comment.