diff --git a/src/lib.rs b/src/lib.rs index 1b6039c..8aedf66 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -111,9 +111,9 @@ impl Error { /// # derive_str_context!(FooError); /// # let err = ChainError::new(String::new(), None, None); /// // Instead of writing - /// err.find_cause::>(); + /// err.find_cause::>(); /// - /// // leave out the ChainError implementation detail + /// // leave out the chainerror::Error implementation detail /// err.find_chain_cause::(); /// ``` #[inline] @@ -134,13 +134,13 @@ impl Error { /// # derive_str_context!(FooErrorKind); /// # let err = ChainError::new(String::new(), None, None); /// // Instead of writing - /// err.find_cause::>(); + /// err.find_cause::>(); /// // and/or /// err.find_chain_cause::(); /// // and/or /// err.find_cause::(); /// - /// // leave out the ChainError implementation detail + /// // leave out the chainerror::Error implementation detail /// err.find_kind_or_cause::(); /// ``` #[inline] @@ -192,7 +192,7 @@ impl Error { /// # } /// # } /// - /// fn func1() -> ChainResult<(), Func1ErrorKind> { + /// fn func1() -> chainerror::Result<(), Func1ErrorKind> { /// func2().context(Func1ErrorKind::Func2)?; /// do_some_io().context(Func1ErrorKind::IO("bar.txt".into()))?; /// Ok(()) @@ -559,7 +559,7 @@ where /// # } /// derive_str_context!(Func2Error); /// -/// fn func2() -> ChainResult<(), Func2Error> { +/// fn func2() -> chainerror::Result<(), Func2Error> { /// let filename = "foo.txt"; /// do_some_io().context(Func2Error(format!("Error reading '{}'", filename)))?; /// Ok(()) diff --git a/tests/test_basic.rs b/tests/test_basic.rs index ac5412c..dfdc5f8 100644 --- a/tests/test_basic.rs +++ b/tests/test_basic.rs @@ -1,4 +1,4 @@ -use chainerror::prelude::v1::*; +use chainerror::ResultTrait; #[test] fn test_basic() { @@ -19,7 +19,6 @@ fn test_basic() { if let Err(e) = process_config_file() { let os_notfound_error = std::io::Error::from_raw_os_error(2); - eprintln!("Error:\n{:?}", e); let s = format!("{:?}", e); let lines = s.lines().collect::>(); assert_eq!(lines.len(), 5); diff --git a/tests/test_iter.rs b/tests/test_iter.rs index f5f0e58..3a464b1 100644 --- a/tests/test_iter.rs +++ b/tests/test_iter.rs @@ -1,4 +1,4 @@ -use chainerror::prelude::v1::*; +use chainerror::ResultTrait; use std::error::Error; use std::io;