diff options
author | Andrew Gallant <jamslam@gmail.com> | 2015-01-09 23:20:04 -0500 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2015-01-09 23:20:04 -0500 |
commit | 72e1d5eb684acb8158020d1a136dd4bb3f5f47f0 (patch) | |
tree | 76823a57f6d403f074b0a9384abb29f6c0c6e50f /src/main.rs | |
parent | 45dfe234f41fbb3dc9b2789e7405a841f1cde6db (diff) |
Use deref instead of as_slice
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index 2a2aa9c..6ae1e06 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,7 +21,7 @@ use docopt::Docopt; macro_rules! werr { ($($arg:tt)*) => ( - match ::std::io::stderr().write_str(format!($($arg)*).as_slice()) { + match ::std::io::stderr().write_str(&*format!($($arg)*)) { Ok(_) => (), Err(err) => panic!("{}", err), } @@ -102,7 +102,7 @@ Please choose one of the following commands:", Err(CliError::Csv(err)) => { os::set_exit_status(1); io::stderr() - .write_str(format!("{}\n", err.to_string()).as_slice()) + .write_str(&*format!("{}\n", err.to_string())) .unwrap(); } Err(CliError::Io( @@ -112,13 +112,13 @@ Please choose one of the following commands:", Err(CliError::Io(err)) => { os::set_exit_status(1); io::stderr() - .write_str(format!("{}\n", err.to_string()).as_slice()) + .write_str(&*format!("{}\n", err.to_string())) .unwrap(); } Err(CliError::Other(msg)) => { os::set_exit_status(1); io::stderr() - .write_str(format!("{}\n", msg).as_slice()) + .write_str(&*format!("{}\n", msg)) .unwrap(); } } |