mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-12-06 08:25:41 -08:00
11 lines
424 B
Rust
11 lines
424 B
Rust
//! Lines for the app's log, its stderr, on the paths a quit takes. `eprintln!` panics when the
|
|
//! write fails, as it does once the terminal the app was started from has closed: the quit's
|
|
//! cleanup would end at its first line, with the app still open.
|
|
|
|
use std::io::Write;
|
|
|
|
/// Writes one line, or nothing when the log cannot be written to.
|
|
pub fn line(text: &str) {
|
|
let _ = writeln!(std::io::stderr(), "{text}");
|
|
}
|