MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / print_diagnosis

Function print_diagnosis

atomic-cli/src/commands/doctor.rs:403–435  ·  view source on GitHub ↗
(diagnosis: &atomic_repository::WorkingCopyRegistrationDiagnosis)

Source from the content-addressed store, hash-verified

401}
402
403fn print_diagnosis(diagnosis: &atomic_repository::WorkingCopyRegistrationDiagnosis) {
404 print_info(&format!(
405 "Working copy {}: location {}; desired view {} ({}) at {}; observed {}; \
406 materialized {}; target '{}' at {}",
407 diagnosis.working_copy,
408 if diagnosis.location_matches {
409 "matches"
410 } else {
411 "MISMATCH"
412 },
413 diagnosis.desired_view_id,
414 diagnosis
415 .desired_view_name
416 .as_deref()
417 .unwrap_or("<missing>"),
418 diagnosis.desired_state,
419 diagnosis
420 .observed_desired_view_state
421 .map(|state| state.to_string())
422 .unwrap_or_else(|| "<missing>".to_string()),
423 diagnosis
424 .materialized_state
425 .map(|state| state.to_string())
426 .unwrap_or_else(|| "none".to_string()),
427 diagnosis.target_view_name,
428 diagnosis.target_view_state,
429 ));
430 if diagnosis.desired_view_is_stale {
431 print_warning(
432 "The recorded desired state no longer matches its view (stale registration).",
433 );
434 }
435}
436
437impl Command for RepairNativeIndexes {
438 fn run(&self) -> CliResult<()> {

Callers 1

runMethod · 0.85

Calls 2

print_infoFunction · 0.85
print_warningFunction · 0.85

Tested by

no test coverage detected