Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
struct StdoutLogger {}
impl std::fmt::Display for StdoutLogger {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
writeln!(f, "I am StdoutLogger")
fn main() {
let l = StdoutLogger {};
println!("{}", l);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment