diff --git a/src/main.rs b/src/main.rs index dcac47f..f7b7db9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,11 +4,12 @@ mod page; mod result; mod section; +use std::error::Error; + use index::Index; use manipulate::manipulate; -pub use result::{Exit, Result}; -fn main() -> Result<()> { +fn main() -> Result> { let mut index = Index::from("src")?; manipulate(&mut index)?; index.write("public")?; diff --git a/src/result.rs b/src/result.rs deleted file mode 100644 index 85129b4..0000000 --- a/src/result.rs +++ /dev/null @@ -1,21 +0,0 @@ -use std::{error, fmt, result}; - -pub type Result = result::Result; - -pub type Error = Box; - -pub type Exit = result::Result<(), Display>; - -pub struct Display(T); - -impl fmt::Debug for Display { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "{}", self.0) - } -} - -impl From for Display { - fn from(t: T) -> Display { - Display(t) - } -}