Skip to content

Commit 9c96381

Browse files
committed
move async off main
1 parent ededda3 commit 9c96381

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dsc/src/main.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ pub mod util;
2828

2929
i18n!("locales", fallback = "en-us");
3030

31-
#[tokio::main(flavor = "multi_thread")]
32-
async fn main() {
31+
fn main() {
3332
#[cfg(debug_assertions)]
3433
check_debug();
3534

@@ -99,7 +98,7 @@ async fn main() {
9998
subcommand::function(&subcommand);
10099
},
101100
SubCommand::Mcp => {
102-
if let Err(err) = start_mcp_server().await {
101+
if let Err(err) = start_mcp_server() {
103102
error!("{}", t!("main.failedToStartMcpServer", error = err));
104103
exit(util::EXIT_MCP_FAILED);
105104
}

dsc/src/mcp/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ impl ServerHandler for McpServer {
4848
/// # Errors
4949
///
5050
/// This function will return an error if the MCP server fails to start.
51+
#[tokio::main(flavor = "multi_thread")]
5152
pub async fn start_mcp_server() -> Result<(), McpError> {
5253
let service = match McpServer::new().serve(stdio()).await {
5354
Ok(service) => service,

0 commit comments

Comments
 (0)