Mon, 30 Dec 2024 15:46:28 -0500
Use anyhow::Error in DynError
Cargo.lock | file | annotate | diff | comparison | revisions | |
Cargo.toml | file | annotate | diff | comparison | revisions | |
src/error.rs | file | annotate | diff | comparison | revisions |
--- a/Cargo.lock Tue Dec 31 08:49:10 2024 -0500 +++ b/Cargo.lock Mon Dec 30 15:46:28 2024 -0500 @@ -6,6 +6,7 @@ name = "alg_tools" version = "0.3.0-dev" dependencies = [ + "anyhow", "colored", "cpu-time", "csv", @@ -21,6 +22,12 @@ ] [[package]] +name = "anyhow" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" + +[[package]] name = "approx" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index"
--- a/Cargo.toml Tue Dec 31 08:49:10 2024 -0500 +++ b/Cargo.toml Mon Dec 30 15:46:28 2024 -0500 @@ -24,6 +24,7 @@ serde_json = "~1.0.85" rayon = "1.5.3" simba = "0.9.0" +anyhow = "1.0.95" [package.metadata.docs.rs] rustdoc-args = [ "--html-in-header", "katex-header.html" ]
--- a/src/error.rs Tue Dec 31 08:49:10 2024 -0500 +++ b/src/error.rs Mon Dec 30 15:46:28 2024 -0500 @@ -2,10 +2,8 @@ Error passing helper types */ -use std::error::Error; - /// A [`Result`] containing `T` or a dynamic error type -pub type DynResult<T> = Result<T, Box<dyn Error>>; +pub type DynResult<T> = Result<T, anyhow::Error>; /// A [`Result`] containing `()` or a dynamic error type pub type DynError = DynResult<()>;