Skip to content

Commit b5ad75f

Browse files
committed
refactor: use unwrap_or_default to simplify match statement
1 parent 1fec560 commit b5ad75f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vmm/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ async fn main() -> Result<()> {
161161
let config = Config::extract_or_default(&figment)?.abs_path()?;
162162

163163
// Handle commands
164-
match args.command {
165-
Some(Command::Run(run_args)) => {
164+
match args.command.unwrap_or_default() {
165+
Command::Run(run_args) => {
166166
// One-shot VM execution mode
167167
return one_shot::run_one_shot(
168168
&run_args.vm_config,
@@ -172,7 +172,7 @@ async fn main() -> Result<()> {
172172
)
173173
.await;
174174
}
175-
Some(Command::Serve) | None => {
175+
Command::Serve => {
176176
// Default server mode - continue to main server logic
177177
}
178178
}

0 commit comments

Comments
 (0)