File tree Expand file tree Collapse file tree 4 files changed +12
-7
lines changed Expand file tree Collapse file tree 4 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ impl RootContext for HttpBodyRoot {
36
36
37
37
impl Context for HttpBodyRoot { }
38
38
39
-
40
39
impl Context for HttpBody { }
41
40
42
41
impl HttpContext for HttpBody {
Original file line number Diff line number Diff line change @@ -19,9 +19,7 @@ use proxy_wasm::types::*;
19
19
#[ no_mangle]
20
20
pub fn _start ( ) {
21
21
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 ) } ) ;
25
23
}
26
24
27
25
struct HttpHeadersRoot ;
@@ -34,7 +32,9 @@ impl RootContext for HttpHeadersRoot {
34
32
}
35
33
36
34
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
+ } )
38
38
}
39
39
}
40
40
Original file line number Diff line number Diff line change @@ -122,7 +122,9 @@ impl Dispatcher {
122
122
} else if let Some ( root_context) = self . roots . borrow ( ) . get ( & root_context_id) {
123
123
match root_context. get_type ( ) {
124
124
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
+ }
126
128
ContextType :: RootContext => panic ! ( "missing constructors" ) ,
127
129
}
128
130
} else {
Original file line number Diff line number Diff line change @@ -126,7 +126,11 @@ pub trait RootContext: Context {
126
126
Box :: new ( EmptyHttpContext )
127
127
}
128
128
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 > {
130
134
Box :: new ( EmptyStreamContext )
131
135
}
132
136
You can’t perform that action at this time.
0 commit comments