Remove unused imports
This commit is contained in:
parent
933ba62f39
commit
e830589e38
@ -147,7 +147,7 @@ fn batch_insert_episodes(episodes: &[NewEpisode]) {
|
||||
mod tests {
|
||||
use failure::Error;
|
||||
use rss::Channel;
|
||||
use tokio::{self, prelude::*};
|
||||
use tokio;
|
||||
use futures::executor::block_on;
|
||||
|
||||
use crate::database::truncate_db;
|
||||
|
||||
@ -578,10 +578,6 @@ mod tests {
|
||||
let ep = EXPECTED_MINIMAL_INTERCEPTED_1
|
||||
.clone()
|
||||
.into_new_episode(&item);
|
||||
println!(
|
||||
"EPISODE: {:#?}\nEXPECTED: {:#?}",
|
||||
ep, *EXPECTED_INTERCEPTED_1
|
||||
);
|
||||
assert_eq!(ep, *EXPECTED_INTERCEPTED_1);
|
||||
|
||||
let item = channel.items().iter().nth(15).unwrap();
|
||||
|
||||
@ -31,9 +31,6 @@ use http::header::{
|
||||
USER_AGENT as USER_AGENT_HEADER,
|
||||
};
|
||||
use http::{Request, Response, StatusCode, Uri};
|
||||
// use futures::future::ok;
|
||||
use futures::future::Future;
|
||||
use futures::prelude::*;
|
||||
|
||||
use base64::{encode_config, URL_SAFE};
|
||||
|
||||
@ -325,7 +322,6 @@ async fn response_to_channel(
|
||||
mod tests {
|
||||
use super::*;
|
||||
use failure::Error;
|
||||
use num_cpus;
|
||||
use tokio;
|
||||
|
||||
use crate::database::truncate_db;
|
||||
|
||||
@ -210,7 +210,6 @@ mod tests {
|
||||
use super::*;
|
||||
use chrono::Local;
|
||||
use failure::Error;
|
||||
use futures::Future;
|
||||
use futures::executor::block_on;
|
||||
|
||||
use crate::database::{truncate_db, TEMPDIR};
|
||||
|
||||
@ -27,8 +27,6 @@ use hyper::client::HttpConnector;
|
||||
use hyper::{Body, Client};
|
||||
use hyper_tls::HttpsConnector;
|
||||
|
||||
use num_cpus;
|
||||
|
||||
use crate::errors::DataError;
|
||||
use crate::Source;
|
||||
|
||||
@ -48,9 +46,14 @@ where
|
||||
{
|
||||
while let Some(source_result) = sources.next().await {
|
||||
if let Ok(source) = source_result {
|
||||
if let Ok(feed) = source.into_feed(client.clone()).await {
|
||||
let fut = lazy(|_| feed.index().map_err(|err| error!("Error: {}", err)));
|
||||
tokio::spawn(fut);
|
||||
match source.into_feed(client.clone()).await {
|
||||
Ok(feed) => {
|
||||
let fut = lazy(|_| feed.index().map_err(|err| error!("Error: {}", err)));
|
||||
tokio::spawn(fut);
|
||||
},
|
||||
// Avoid spamming the stderr when it's not an actual error
|
||||
Err(DataError::FeedNotModified(_)) => (),
|
||||
Err(err) => error!("Error: {}", err),
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -100,7 +103,6 @@ mod tests {
|
||||
let bad_url = "https://gitlab.gnome.org/World/podcasts.atom";
|
||||
// if a stream returns error/None it stops
|
||||
// bad we want to parse all feeds regardless if one fails
|
||||
//TODO_JH: Remove comment
|
||||
Source::from_url(bad_url)?;
|
||||
|
||||
URLS.iter().for_each(|url| {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user