Skip to content

Commit f9ca0cd

Browse files
committed
[model-gateway] wasm: code format (sgl-project#12471)
Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
1 parent db37fbd commit f9ca0cd

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

sgl-router/src/app_context.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use crate::{
2323
traits::Tokenizer,
2424
},
2525
tool_parser::ParserFactory as ToolParserFactory,
26-
wasm::{module_manager::WasmModuleManager, config::WasmRuntimeConfig},
26+
wasm::{config::WasmRuntimeConfig, module_manager::WasmModuleManager},
2727
};
2828

2929
/// Error type for AppContext builder
@@ -520,13 +520,14 @@ impl AppContextBuilder {
520520
/// Create wasm manager if enabled in config
521521
fn with_wasm_manager(mut self, config: &RouterConfig) -> Self {
522522
self.wasm_manager = if config.enable_wasm {
523-
Some(Arc::new(WasmModuleManager::new(WasmRuntimeConfig::default()).unwrap()))
523+
Some(Arc::new(
524+
WasmModuleManager::new(WasmRuntimeConfig::default()).unwrap(),
525+
))
524526
} else {
525527
None
526528
};
527529
self
528530
}
529-
530531
}
531532

532533
impl Default for AppContextBuilder {

sgl-router/src/server.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ use crate::{
4747
},
4848
routers::{router_manager::RouterManager, RouterTrait},
4949
service_discovery::{start_service_discovery, ServiceDiscoveryConfig},
50-
wasm::{
51-
route::{add_wasm_module, list_wasm_modules, remove_wasm_module},
52-
},
50+
wasm::route::{add_wasm_module, list_wasm_modules, remove_wasm_module},
5351
};
5452

5553
#[derive(Clone)]

sgl-router/src/wasm/wit/spec.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ interface middleware-on-response {
5151
world sgl-router {
5252
export middleware-on-request;
5353
export middleware-on-response;
54-
}
54+
}

0 commit comments

Comments
 (0)