From a991d9f512493b3ebb41caf19be6334ab59d528d Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Mon, 3 Sep 2018 15:39:02 +0300 Subject: [PATCH] DataError: Remove unused error variant This was added due to Threadpool::spawn returning errors, but its no longer used. --- Cargo.lock | 2 -- podcasts-data/Cargo.toml | 2 -- podcasts-data/src/errors.rs | 9 --------- podcasts-data/src/lib.rs | 2 -- 4 files changed, 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index baf5772..60563a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1506,8 +1506,6 @@ dependencies = [ "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/podcasts-data/Cargo.toml b/podcasts-data/Cargo.toml index 1ccb927..a856189 100644 --- a/podcasts-data/Cargo.toml +++ b/podcasts-data/Cargo.toml @@ -20,8 +20,6 @@ futures = "0.1.23" hyper = "0.11.27" tokio = "0.1.8" tokio-core = "0.1.17" -tokio-threadpool = "0.1.6" -tokio-executor = "0.1" hyper-tls = "0.1.3" native-tls = "0.1.5" num_cpus = "1.8.0" diff --git a/podcasts-data/src/errors.rs b/podcasts-data/src/errors.rs index 5e6e2ec..64b20c9 100644 --- a/podcasts-data/src/errors.rs +++ b/podcasts-data/src/errors.rs @@ -4,7 +4,6 @@ use diesel_migrations::RunMigrationsError; use hyper; use native_tls; use rss; -use tokio_executor; use url; use xml; @@ -47,8 +46,6 @@ pub enum DataError { R2D2PoolError(#[cause] r2d2::PoolError), #[fail(display = "Hyper Error: {}", _0)] HyperError(#[cause] hyper::Error), - #[fail(display = "Tokio Spawn Error: {}", _0)] - SpawnError(#[cause] tokio_executor::SpawnError), #[fail(display = "Failed to parse a url: {}", _0)] UrlError(#[cause] url::ParseError), #[fail(display = "TLS Error: {}", _0)] @@ -104,12 +101,6 @@ impl From for DataError { } } -impl From for DataError { - fn from(err: tokio_executor::SpawnError) -> Self { - DataError::SpawnError(err) - } -} - impl From for DataError { fn from(err: url::ParseError) -> Self { DataError::UrlError(err) diff --git a/podcasts-data/src/lib.rs b/podcasts-data/src/lib.rs index 7605929..4fffa7c 100644 --- a/podcasts-data/src/lib.rs +++ b/podcasts-data/src/lib.rs @@ -84,8 +84,6 @@ extern crate rfc822_sanitizer; extern crate rss; extern crate tokio; extern crate tokio_core; -extern crate tokio_executor; -extern crate tokio_threadpool; extern crate url; extern crate xdg; extern crate xml;