Skip to content

Commit 94ecd03

Browse files
committed
Make rustfmt happy
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
1 parent 28ba351 commit 94ecd03

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

examples/http_body.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ impl RootContext for HttpBodyRoot {
3636

3737
impl Context for HttpBodyRoot {}
3838

39-
4039
impl Context for HttpBody {}
4140

4241
impl HttpContext for HttpBody {

examples/http_headers.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ use proxy_wasm::types::*;
1919
#[no_mangle]
2020
pub fn _start() {
2121
proxy_wasm::set_log_level(LogLevel::Trace);
22-
proxy_wasm::set_root_context(|_| -> Box<dyn RootContext> {
23-
Box::new(HttpHeadersRoot)
24-
});
22+
proxy_wasm::set_root_context(|_| -> Box<dyn RootContext> { Box::new(HttpHeadersRoot) });
2523
}
2624

2725
struct HttpHeadersRoot;
@@ -34,7 +32,9 @@ impl RootContext for HttpHeadersRoot {
3432
}
3533

3634
fn create_http_context(&self, _context_id: u32, _root_context_id: u32) -> Box<dyn HttpContext> {
37-
Box::new(HttpHeaders{context_id: _context_id})
35+
Box::new(HttpHeaders {
36+
context_id: _context_id,
37+
})
3838
}
3939
}
4040

src/dispatcher.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ impl Dispatcher {
122122
} else if let Some(root_context) = self.roots.borrow().get(&root_context_id) {
123123
match root_context.get_type() {
124124
ContextType::HttpContext => self.create_http_context(context_id, root_context_id),
125-
ContextType::StreamContext => self.create_stream_context(context_id, root_context_id),
125+
ContextType::StreamContext => {
126+
self.create_stream_context(context_id, root_context_id)
127+
}
126128
ContextType::RootContext => panic!("missing constructors"),
127129
}
128130
} else {

src/traits.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,11 @@ pub trait RootContext: Context {
126126
Box::new(EmptyHttpContext)
127127
}
128128

129-
fn create_stream_context(&self, _context_id: u32, _root_context_id: u32) -> Box<dyn StreamContext> {
129+
fn create_stream_context(
130+
&self,
131+
_context_id: u32,
132+
_root_context_id: u32,
133+
) -> Box<dyn StreamContext> {
130134
Box::new(EmptyStreamContext)
131135
}
132136

0 commit comments

Comments
 (0)