Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
trait Logger {
fn log(&self, s: &str);
fn err(&self, e: &str) {
struct StdoutLogger {}
impl Logger for StdoutLogger {
fn log(&self, s: &str) {
println!("{}", s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment