Clippy suggestions
This commit is contained in:
parent
817d5d9cf7
commit
2f062afb07
@ -89,7 +89,7 @@ fn bench_index_large_feed(c: &mut Criterion) {
|
||||
.source_id(s.id())
|
||||
.build()
|
||||
.unwrap();
|
||||
let _foo = core.run(feed.index()).unwrap();
|
||||
core.run(feed.index()).unwrap();
|
||||
})
|
||||
});
|
||||
truncate_db().unwrap();
|
||||
@ -110,7 +110,7 @@ fn bench_index_small_feed(c: &mut Criterion) {
|
||||
.source_id(s.id())
|
||||
.build()
|
||||
.unwrap();
|
||||
let _foo = core.run(feed.index()).unwrap();
|
||||
core.run(feed.index()).unwrap();
|
||||
})
|
||||
});
|
||||
truncate_db().unwrap();
|
||||
|
||||
@ -149,7 +149,7 @@ impl Source {
|
||||
///
|
||||
/// This only indexes the `Source` struct, not the Podcast Feed.
|
||||
pub fn from_url(uri: &str) -> Result<Source> {
|
||||
let url = Url::parse(&uri)?;
|
||||
let url = Url::parse(uri)?;
|
||||
|
||||
NewSource::new(&url).to_source()
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ pub fn pipeline<S: IntoIterator<Item = Source>>(
|
||||
sources: S,
|
||||
ignore_etags: bool,
|
||||
tokio_core: &mut Core,
|
||||
pool: CpuPool,
|
||||
pool: &CpuPool,
|
||||
client: Client<HttpsConnector<HttpConnector>>,
|
||||
) -> Result<()> {
|
||||
let list: Vec<_> = sources
|
||||
@ -69,7 +69,7 @@ pub fn pipeline<S: IntoIterator<Item = Source>>(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Creates a tokio-core, a cpu_pool, and a hyper::Client and runs the pipeline.
|
||||
/// Creates a tokio `reactor::Core`, a `CpuPool`, and a `hyper::Client` and runs the pipeline.
|
||||
pub fn run(sources: Vec<Source>, ignore_etags: bool) -> Result<()> {
|
||||
if sources.is_empty() {
|
||||
return Ok(());
|
||||
@ -82,7 +82,7 @@ pub fn run(sources: Vec<Source>, ignore_etags: bool) -> Result<()> {
|
||||
.connector(HttpsConnector::new(num_cpus::get(), &handle)?)
|
||||
.build(&handle);
|
||||
|
||||
pipeline(sources, ignore_etags, &mut core, pool, client)
|
||||
pipeline(sources, ignore_etags, &mut core, &pool, client)
|
||||
}
|
||||
|
||||
fn determine_ep_state(ep: NewEpisodeMinimal, item: &rss::Item) -> Result<IndexState<NewEpisode>> {
|
||||
@ -114,7 +114,8 @@ pub(crate) fn glue_async<'a>(
|
||||
|
||||
// Weird magic from #rust irc channel
|
||||
// kudos to remexre
|
||||
/// docs
|
||||
/// FIXME: Docs
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(type_complexity))]
|
||||
pub fn collect_futures<F>(
|
||||
futures: Vec<F>,
|
||||
) -> Box<Future<Item = Vec<std::result::Result<F::Item, F::Error>>, Error = Error>>
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(type_complexity))]
|
||||
|
||||
use gdk_pixbuf::Pixbuf;
|
||||
use send_cell::SendCell;
|
||||
|
||||
|
||||
@ -288,6 +288,7 @@ fn on_play_bttn_clicked(episode_id: i32) {
|
||||
}
|
||||
|
||||
// Setup a callback that will update the progress bar.
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(if_same_then_else))]
|
||||
fn update_progressbar_callback(
|
||||
prog: Arc<Mutex<manager::Progress>>,
|
||||
episode_rowid: i32,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user