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

Method drop

atomic-cli/src/output/live.rs:84–101  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

82
83impl Drop for LiveOutput {
84 fn drop(&mut self) {
85 let state = ACTIVE.lock().unwrap_or_else(|e| e.into_inner()).take();
86 if let Some(state) = state {
87 for (kind, message) in state.diagnostics {
88 let label = match kind {
89 Kind::Error => "Error",
90 _ => "Warning",
91 };
92 eprintln!("{label}: {message}");
93 }
94 if state.omitted > 0 {
95 eprintln!("{} earlier diagnostics omitted from the live view; consult the Atomic log for full diagnostics.", state.omitted);
96 }
97 if let Some(message) = state.success {
98 println!("{message}");
99 }
100 }
101 }
102}
103
104#[cfg(test)]

Callers

nothing calls this directly

Calls 2

lockMethod · 0.80
into_innerMethod · 0.45

Tested by

no test coverage detected