Logo

Programming-Idioms

History of Idiom 59 > diff from v39 to v40

Edit summary for version 40 by Debaran:
[Rust] Fixed explanation
↷

Version 39

2019-02-02, 05:16:06

Version 40

2019-02-02, 05:16:26

Idiom #59 Write to standard error stream

Print the message "x is negative" to standard error (stderr), with integer x value substitution (e.g. "-2 is negative").

Idiom #59 Write to standard error stream

Print the message "x is negative" to standard error (stderr), with integer x value substitution (e.g. "-2 is negative").

Code
eprintln!("{} is negative", x);
Code
eprintln!("{} is negative", x);
Comments bubble
Please note that writing to `stderr` can fail—therefor the `unwrap`.