killercup / convey

A Rust create for outputting information and log messages for humans and machines
https://docs.rs/convey
Apache License 2.0
39 stars 5 forks source link

Add impl Render for &'a str #13

Closed Redrield closed 5 years ago

Redrield commented 5 years ago

Allows Output::print to accept a &str. Fixes #10

killercup commented 5 years ago

Thanks again!

Can you maybe add a quick test for this, too? A doc comment ont he impl block with something like

# let test_target = output::human::test();
let mut out = output::new().add_target(test_target.target());
out.print("lorem ipsum")?;
# assert_eq!(test_target.to_string(), "lorem ipsum\n");

should do it.

killercup commented 5 years ago

Thanks for the quick update! A doc comment would've been more visible, but this is fine, too.