aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2016-04-22 16:24:43 -0400
committerTeddy Wing2016-04-22 16:24:43 -0400
commit7d71a6392836880d88bab27481b32e6b63b77c6e (patch)
treeb2f01e9f0878aa6f81b78f0ca8fd96e682a18ca3
parenta482d55670aa4d960e70add5c387c04f9afa2b2e (diff)
downloadmutt-alias-auto-add-7d71a6392836880d88bab27481b32e6b63b77c6e.tar.bz2
main: Simplify the STDOUT writer
I wrote it the way I originally did because I wanted to be more explicit, but I don't think that was right. Doing it this way because it makes the code much simpler. Also found out there's a `writeln!` macro which I probably should have used instead of manually adding a newline before.
-rw-r--r--src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 9f01fd6..e5bab05 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -138,7 +138,7 @@ fn main() {
let line = line.unwrap();
// Write the message to STDOUT so that it can be properly read by Mutt
- write!(io::stdout(), "{}\n", line).unwrap();
+ println!("{}", line);
if line.starts_with("From: ") {
match write_alias(line) {