diff options
author | Andrew Gallant <jamslam@gmail.com> | 2015-01-06 19:53:33 -0500 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2015-01-06 19:53:33 -0500 |
commit | a2588cf840fe8c07a27283723512828f72bba247 (patch) | |
tree | 703458d8302a3631361bf014ad7e73a48a002042 /src/main.rs | |
parent | 06ea082f1c4b9f31cec95f12fe417b089fe1bf23 (diff) |
rustup
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs index 97d7a03..f234192 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,6 @@ These are some docs. */ #![feature(macro_rules, slicing_syntax)] -#![feature(old_orphan_check)] // see rustc commit c61a00 #![allow(dead_code, unused_variables)] @@ -14,10 +13,10 @@ extern crate "rustc-serialize" as rustc_serialize; extern crate stats; extern crate tabwriter; +use std::borrow::ToOwned; use std::error::FromError; use std::io; use std::os; -use csv::StrAllocating; use docopt::Docopt; @@ -207,9 +206,15 @@ impl FromError<io::IoError> for CliError { } } -impl<T: StrAllocating> FromError<T> for CliError { - fn from_error(err: T) -> CliError { - CliError::Other(err.into_str()) +impl FromError<String> for CliError { + fn from_error(err: String) -> CliError { + CliError::Other(err) + } +} + +impl<'a> FromError<&'a str> for CliError { + fn from_error(err: &'a str) -> CliError { + CliError::Other(err.to_owned()) } } |