Skip to content

Commit

Permalink
feat: refactored ExecutorCache trait
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslanti committed Aug 15, 2024
1 parent 44a6426 commit 556e221
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,8 @@ pub trait ContextT {
}

pub trait ExecutorCache {
fn invalidate(&self, name: &str);
fn remove(&self, name: &str);
fn remove_all(&self);
}

pub trait Router: Send + Sync {
Expand Down Expand Up @@ -395,7 +396,6 @@ pub fn componentize_if_necessary(buffer: &[u8]) -> anyhow::Result<Cow<[u8]>> {
}

fn componentize(module: &[u8]) -> anyhow::Result<Vec<u8>> {
tracing::trace!("componentize module");
ComponentEncoder::default()
.validate(true)
.module(&module)?
Expand Down
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,11 @@ impl ExecutorFactory<HttpState<HttpsConnector<HttpConnector>>> for CliContext {
}

impl ExecutorCache for CliContext {
fn invalidate(&self, _name: &str) {
fn remove(&self, _name: &str) {
unreachable!()
}

fn remove_all(&self) {
unreachable!()
}
}
Expand Down

0 comments on commit 556e221

Please sign in to comment.