Add test subcommand

Co-Authored-By: Timothy Clem <timothy.clem@gmail.com>
This commit is contained in:
Max Brunsfeld 2019-01-07 17:57:27 -08:00
parent f059557a9d
commit 8291d294fb
6 changed files with 496 additions and 9 deletions

View file

@ -1,3 +1,5 @@
use std::io;
#[derive(Debug)]
pub struct Error(pub String);
@ -22,3 +24,15 @@ impl From<serde_json::Error> for Error {
Error(error.to_string())
}
}
impl From<io::Error> for Error {
fn from(error: io::Error) -> Self {
Error(error.to_string())
}
}
impl From<String> for Error {
fn from(error: String) -> Self {
Error(error)
}
}