Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrishn7 committed Nov 14, 2023
1 parent dff5378 commit 33efefa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/kiwi/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ async fn main() -> anyhow::Result<()> {

let pre_forward = config
.plugins
.and_then(|plugins| plugins.pre_forward).map(|path| WasmPlugin::from_file(path).expect("failed to load pre-forward plugin"));
.and_then(|plugins| plugins.pre_forward)
.map(|path| WasmPlugin::from_file(path).expect("failed to load pre-forward plugin"));

let listen_addr: SocketAddr = config.server.address.parse()?;

Expand Down
6 changes: 1 addition & 5 deletions src/kiwi/src/plugin/wasm/bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,7 @@ impl From<plugin::types::AuthCtx> for Auth {
impl From<plugin::types::JwtCtx> for Jwt {
fn from(value: plugin::types::JwtCtx) -> Self {
Self {
claims: value
.claims
.into_iter()
.map(|(k, v)| (k, v))
.collect(),
claims: value.claims.into_iter().map(|(k, v)| (k, v)).collect(),
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/kiwi/src/source/kafka.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ impl LazyKafkaTopicConsumer {
tokio::task::yield_now().await;
}
LazyKafkaTopicConsumerState::Consuming => {
self.inner.subscribe(&[&self.topic]).unwrap_or_else(|_| panic!("failed to subscribe to kafka topic {}", &self.topic));
self.inner.subscribe(&[&self.topic]).unwrap_or_else(|_| {
panic!("failed to subscribe to kafka topic {}", &self.topic)
});

let mut stream = self.inner.stream();

Expand Down

0 comments on commit 33efefa

Please sign in to comment.