diff --git a/Cargo.lock b/Cargo.lock index 650f9fd..bc6782b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -30,6 +30,11 @@ dependencies = [ "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "anyhow" +version = "1.0.32" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "arc-swap" version = "0.4.7" @@ -1962,6 +1967,7 @@ dependencies = [ name = "youmubot-prelude" version = "0.1.0" dependencies = [ + "anyhow 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-channel 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1975,6 +1981,7 @@ dependencies = [ "checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" "checksum ahash 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" "checksum aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada" +"checksum anyhow 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)" = "6b602bfe940d21c130f3895acd65221e8a61270debe89d628b9cb4e3ccb8569b" "checksum arc-swap 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034" "checksum async-tls 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce6977f57fa68da77ffe5542950d47e9c23d65f5bc7cb0a9f8700996913eec7" "checksum async-trait 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "687c230d85c0a52504709705fc8a53e4a692b83a2184f03dae73e38e1e93a783" diff --git a/youmubot-prelude/Cargo.toml b/youmubot-prelude/Cargo.toml index f3ac775..9f7eee0 100644 --- a/youmubot-prelude/Cargo.toml +++ b/youmubot-prelude/Cargo.toml @@ -8,6 +8,7 @@ edition = "2018" [dependencies] serenity = "0.9.0-rc.0" +anyhow = "1.0" youmubot-db = { path = "../youmubot-db" } crossbeam-channel = "0.4" reqwest = "0.10" diff --git a/youmubot-prelude/src/lib.rs b/youmubot-prelude/src/lib.rs index 0a9c2e9..20ad9a1 100644 --- a/youmubot-prelude/src/lib.rs +++ b/youmubot-prelude/src/lib.rs @@ -12,6 +12,9 @@ pub use args::{Duration, UsernameArg}; pub use pagination::Pagination; pub use reaction_watch::{ReactionHandler, ReactionWatcher}; +/// Re-export the anyhow errors +pub use anyhow::{Error, Result}; + /// The global app data. pub type AppData = Arc>;