@@ -24,7 +24,7 @@ pub fn clean(options: MemorySyncCommandOptions) -> Result<MemorySyncCommandResul
2424 options
2525 . log_level
2626 . as_deref ( )
27- . and_then ( crate :: infra:: logger:: LogLevel :: from_str_loose) ,
27+ . and_then ( |s| crate :: infra:: logger:: LogLevel :: from_str_loose ( s ) ) ,
2828 ) ;
2929 let _span = logger. span ( "command.clean" ) . enter ( ) ;
3030
@@ -149,7 +149,7 @@ pub fn clean(options: MemorySyncCommandOptions) -> Result<MemorySyncCommandResul
149149 } else {
150150 let execute_span = logger. span ( "cleanup.execute" ) . enter ( ) ;
151151 let result =
152- crate :: policy:: cleanup:: perform_cleanup ( snapshot) . map_err ( CliError :: ExecutionError ) ?;
152+ crate :: policy:: cleanup:: perform_cleanup ( snapshot) . map_err ( |e| CliError :: ExecutionError ( e ) ) ?;
153153 execute_span. exit ( ) ;
154154
155155 let blocked = !result. violations . is_empty ( ) || !result. conflicts . is_empty ( ) ;
@@ -317,7 +317,7 @@ fn build_output_map(
317317 {
318318 cleanup_map
319319 . entry ( "ClaudeCodeCLIOutputAdaptor" . to_string ( ) )
320- . or_default ( )
320+ . or_insert_with ( CleanupDeclarationsDto :: default )
321321 . delete
322322 . extend ( plan. cleanup . delete . clone ( ) ) ;
323323 if enabled_plugins. claude_code {
@@ -333,7 +333,7 @@ fn build_output_map(
333333 {
334334 cleanup_map
335335 . entry ( "CodexCLIOutputAdaptor" . to_string ( ) )
336- . or_default ( )
336+ . or_insert_with ( CleanupDeclarationsDto :: default )
337337 . delete
338338 . extend ( plan. cleanup . delete . clone ( ) ) ;
339339 if enabled_plugins. codex {
@@ -350,7 +350,7 @@ fn build_output_map(
350350 {
351351 cleanup_map
352352 . entry ( "CursorOutputAdaptor" . to_string ( ) )
353- . or_default ( )
353+ . or_insert_with ( CleanupDeclarationsDto :: default )
354354 . delete
355355 . extend ( plan. cleanup . delete . clone ( ) ) ;
356356 if enabled_plugins. cursor {
@@ -366,7 +366,7 @@ fn build_output_map(
366366 {
367367 cleanup_map
368368 . entry ( "DroidCLIOutputAdaptor" . to_string ( ) )
369- . or_default ( )
369+ . or_insert_with ( CleanupDeclarationsDto :: default )
370370 . delete
371371 . extend ( plan. cleanup . delete . clone ( ) ) ;
372372 if enabled_plugins. droid {
@@ -383,7 +383,7 @@ fn build_output_map(
383383 {
384384 cleanup_map
385385 . entry ( "GeminiCLIOutputAdaptor" . to_string ( ) )
386- . or_default ( )
386+ . or_insert_with ( CleanupDeclarationsDto :: default )
387387 . delete
388388 . extend ( plan. cleanup . delete . clone ( ) ) ;
389389 if enabled_plugins. gemini {
@@ -404,7 +404,7 @@ fn build_output_map(
404404 if let Ok ( plan) = crate :: domain:: output_plans:: kiro_output_plan:: build_kiro_output_plan ( context) {
405405 cleanup_map
406406 . entry ( "KiroCLIOutputAdaptor" . to_string ( ) )
407- . or_default ( )
407+ . or_insert_with ( CleanupDeclarationsDto :: default )
408408 . delete
409409 . extend ( plan. cleanup . delete . clone ( ) ) ;
410410 if enabled_plugins. kiro {
@@ -421,7 +421,7 @@ fn build_output_map(
421421 {
422422 cleanup_map
423423 . entry ( "OpencodeCLIOutputAdaptor" . to_string ( ) )
424- . or_default ( )
424+ . or_insert_with ( CleanupDeclarationsDto :: default )
425425 . delete
426426 . extend ( plan. cleanup . delete . clone ( ) ) ;
427427 if enabled_plugins. opencode {
@@ -437,7 +437,7 @@ fn build_output_map(
437437 {
438438 cleanup_map
439439 . entry ( "QoderIDEPluginOutputAdaptor" . to_string ( ) )
440- . or_default ( )
440+ . or_insert_with ( CleanupDeclarationsDto :: default )
441441 . delete
442442 . extend ( plan. cleanup . delete . clone ( ) ) ;
443443 if enabled_plugins. qoder {
@@ -452,7 +452,7 @@ fn build_output_map(
452452 if let Ok ( plan) = crate :: domain:: output_plans:: trae_output_plan:: build_trae_output_plan ( context) {
453453 cleanup_map
454454 . entry ( "TraeOutputAdaptor" . to_string ( ) )
455- . or_default ( )
455+ . or_insert_with ( CleanupDeclarationsDto :: default )
456456 . delete
457457 . extend ( plan. cleanup . delete . clone ( ) ) ;
458458 if enabled_plugins. trae || enabled_plugins. trae_cn {
@@ -467,7 +467,7 @@ fn build_output_map(
467467 if let Ok ( plan) = crate :: domain:: output_plans:: warp_output_plan:: build_warp_output_plan ( context) {
468468 cleanup_map
469469 . entry ( "WarpIDEOutputAdaptor" . to_string ( ) )
470- . or_default ( )
470+ . or_insert_with ( CleanupDeclarationsDto :: default )
471471 . delete
472472 . extend ( plan. cleanup . delete . clone ( ) ) ;
473473 if enabled_plugins. warp {
@@ -484,7 +484,7 @@ fn build_output_map(
484484 {
485485 cleanup_map
486486 . entry ( "WindsurfOutputAdaptor" . to_string ( ) )
487- . or_default ( )
487+ . or_insert_with ( CleanupDeclarationsDto :: default )
488488 . delete
489489 . extend ( plan. cleanup . delete . clone ( ) ) ;
490490 if enabled_plugins. windsurf {
0 commit comments