(&mut self)
| 82 | |
| 83 | impl 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)] |
nothing calls this directly
no test coverage detected