Created
January 31, 2021 04:37
-
-
Save grahamking/70eebdadb69d297b063fed7403b12e38 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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