Skip to content

Commit

Permalink
style(wasm-rust-sdk): cargo fmt and cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymiejjj authored and 007gzs committed Sep 10, 2024
1 parent d4ab10d commit 4b3a28a
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions plugins/wasm-rust/src/plugin_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@

use crate::rule_matcher::SharedRuleMatcher;
use multimap::MultiMap;
use proxy_wasm::hostcalls::log;
use proxy_wasm::traits::{Context, HttpContext, RootContext};
use proxy_wasm::types::LogLevel;
use proxy_wasm::types::{Action, Bytes, DataAction, HeaderAction};
use serde::de::DeserializeOwned;
use proxy_wasm::hostcalls::log;
use proxy_wasm::types::LogLevel;


pub trait RootContextWrapper<PluginConfig>: RootContext
where
Expand Down Expand Up @@ -155,8 +154,13 @@ where
Err(_) => {
log(
LogLevel::Warn,
format!("request http header contains non-ASCII characters header: {}", k ).as_str(),
).unwrap();
format!(
"request http header contains non-ASCII characters header: {}",
k
)
.as_str(),
)
.unwrap();
}
}
}
Expand Down Expand Up @@ -210,8 +214,13 @@ where
Err(_) => {
log(
LogLevel::Warn,
format!("response http header contains non-ASCII characters header: {}", k ).as_str(),
).unwrap();
format!(
"response http header contains non-ASCII characters header: {}",
k
)
.as_str(),
)
.unwrap();
}
}
}
Expand Down

0 comments on commit 4b3a28a

Please sign in to comment.