From 32b257ec30bed276eeaed43e1c158dff9c6dbdff Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Tue, 13 Nov 2018 15:29:20 +0200 Subject: [PATCH] cargo fmt --- podcasts-data/src/database.rs | 1 - podcasts-data/src/dbqueries.rs | 1 - podcasts-data/src/errors.rs | 1 - podcasts-data/src/lib.rs | 1 - podcasts-data/src/models/episode.rs | 1 - podcasts-data/src/models/mod.rs | 1 - podcasts-data/src/models/new_episode.rs | 1 - podcasts-data/src/models/new_show.rs | 1 - podcasts-data/src/models/new_source.rs | 1 - podcasts-data/src/models/show.rs | 1 - podcasts-data/src/models/source.rs | 1 - podcasts-data/src/opml.rs | 1 - podcasts-data/src/parser.rs | 1 - podcasts-data/src/pipeline.rs | 1 - podcasts-data/src/utils.rs | 1 - podcasts-downloader/src/downloader.rs | 1 - podcasts-downloader/src/lib.rs | 1 - podcasts-gtk/src/app.rs | 4 +++- podcasts-gtk/src/headerbar.rs | 1 - podcasts-gtk/src/i18n.rs | 1 - podcasts-gtk/src/main.rs | 1 - podcasts-gtk/src/manager.rs | 1 - podcasts-gtk/src/prefs.rs | 1 - podcasts-gtk/src/settings.rs | 1 - podcasts-gtk/src/stacks/content.rs | 1 - podcasts-gtk/src/stacks/home.rs | 1 - podcasts-gtk/src/stacks/mod.rs | 1 - podcasts-gtk/src/stacks/populated.rs | 1 - podcasts-gtk/src/stacks/show.rs | 1 - podcasts-gtk/src/static_resource.rs | 1 - podcasts-gtk/src/widgets/aboutdialog.rs | 1 - podcasts-gtk/src/widgets/appnotif.rs | 1 - podcasts-gtk/src/widgets/base_view.rs | 1 - podcasts-gtk/src/widgets/empty.rs | 1 - podcasts-gtk/src/widgets/episode.rs | 1 - podcasts-gtk/src/widgets/home_view.rs | 1 - podcasts-gtk/src/widgets/mod.rs | 1 - podcasts-gtk/src/widgets/player.rs | 1 - podcasts-gtk/src/widgets/show.rs | 1 - podcasts-gtk/src/widgets/show_menu.rs | 1 - podcasts-gtk/src/widgets/shows_view.rs | 1 - 41 files changed, 3 insertions(+), 41 deletions(-) diff --git a/podcasts-data/src/database.rs b/podcasts-data/src/database.rs index 6869284..3ac23b6 100644 --- a/podcasts-data/src/database.rs +++ b/podcasts-data/src/database.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - //! Database Setup. This is only public to help with some unit tests. // Diesel embed_migrations! triggers the lint #![allow(unused_imports)] diff --git a/podcasts-data/src/dbqueries.rs b/podcasts-data/src/dbqueries.rs index 4df09b4..905930f 100644 --- a/podcasts-data/src/dbqueries.rs +++ b/podcasts-data/src/dbqueries.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - //! Random CRUD helper functions. use chrono::prelude::*; diff --git a/podcasts-data/src/errors.rs b/podcasts-data/src/errors.rs index 5267c13..5168150 100644 --- a/podcasts-data/src/errors.rs +++ b/podcasts-data/src/errors.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use diesel; use diesel::r2d2; use diesel_migrations::RunMigrationsError; diff --git a/podcasts-data/src/lib.rs b/podcasts-data/src/lib.rs index 74142cf..1f21df1 100644 --- a/podcasts-data/src/lib.rs +++ b/podcasts-data/src/lib.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - #![recursion_limit = "1024"] #![allow(unknown_lints)] #![cfg_attr( diff --git a/podcasts-data/src/models/episode.rs b/podcasts-data/src/models/episode.rs index 4d50490..dc6823c 100644 --- a/podcasts-data/src/models/episode.rs +++ b/podcasts-data/src/models/episode.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use chrono::prelude::*; use diesel; use diesel::prelude::*; diff --git a/podcasts-data/src/models/mod.rs b/podcasts-data/src/models/mod.rs index cea90a4..7924121 100644 --- a/podcasts-data/src/models/mod.rs +++ b/podcasts-data/src/models/mod.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - mod new_episode; mod new_show; mod new_source; diff --git a/podcasts-data/src/models/new_episode.rs b/podcasts-data/src/models/new_episode.rs index 609823b..522bd18 100644 --- a/podcasts-data/src/models/new_episode.rs +++ b/podcasts-data/src/models/new_episode.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use ammonia; use diesel; use diesel::prelude::*; diff --git a/podcasts-data/src/models/new_show.rs b/podcasts-data/src/models/new_show.rs index cc799b8..7fdc330 100644 --- a/podcasts-data/src/models/new_show.rs +++ b/podcasts-data/src/models/new_show.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use ammonia; use diesel; use diesel::prelude::*; diff --git a/podcasts-data/src/models/new_source.rs b/podcasts-data/src/models/new_source.rs index e8fdec8..f40eb7c 100644 --- a/podcasts-data/src/models/new_source.rs +++ b/podcasts-data/src/models/new_source.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use diesel; use diesel::prelude::*; use url::Url; diff --git a/podcasts-data/src/models/show.rs b/podcasts-data/src/models/show.rs index 44095d3..c36117f 100644 --- a/podcasts-data/src/models/show.rs +++ b/podcasts-data/src/models/show.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use models::Source; use schema::shows; diff --git a/podcasts-data/src/models/source.rs b/podcasts-data/src/models/source.rs index 6cd2547..735be24 100644 --- a/podcasts-data/src/models/source.rs +++ b/podcasts-data/src/models/source.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use diesel::SaveChangesDsl; // use failure::ResultExt; use rss::Channel; diff --git a/podcasts-data/src/opml.rs b/podcasts-data/src/opml.rs index 78c662d..99b6043 100644 --- a/podcasts-data/src/opml.rs +++ b/podcasts-data/src/opml.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - //! FIXME: Docs // #![allow(unused)] diff --git a/podcasts-data/src/parser.rs b/podcasts-data/src/parser.rs index eeac4a1..1252e89 100644 --- a/podcasts-data/src/parser.rs +++ b/podcasts-data/src/parser.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use rss::extension::itunes::ITunesItemExtension; /// Parses an Item Itunes extension and returns it's duration value in seconds. diff --git a/podcasts-data/src/pipeline.rs b/podcasts-data/src/pipeline.rs index 54f07c1..9fb3bd4 100644 --- a/podcasts-data/src/pipeline.rs +++ b/podcasts-data/src/pipeline.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - // FIXME: //! Docs. diff --git a/podcasts-data/src/utils.rs b/podcasts-data/src/utils.rs index 55f9946..1dcf3b2 100644 --- a/podcasts-data/src/utils.rs +++ b/podcasts-data/src/utils.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - //! Helper utilities for accomplishing various tasks. use chrono::prelude::*; diff --git a/podcasts-downloader/src/downloader.rs b/podcasts-downloader/src/downloader.rs index 173f065..1d37a7d 100644 --- a/podcasts-downloader/src/downloader.rs +++ b/podcasts-downloader/src/downloader.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use glob::glob; use mime_guess; use reqwest; diff --git a/podcasts-downloader/src/lib.rs b/podcasts-downloader/src/lib.rs index e1132db..dba85ce 100644 --- a/podcasts-downloader/src/lib.rs +++ b/podcasts-downloader/src/lib.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - #![recursion_limit = "1024"] #![allow(unknown_lints)] #![cfg_attr(feature = "cargo-clippy", allow(blacklisted_name, option_map_unit_fn))] diff --git a/podcasts-gtk/src/app.rs b/podcasts-gtk/src/app.rs index 52cd974..b71a025 100644 --- a/podcasts-gtk/src/app.rs +++ b/podcasts-gtk/src/app.rs @@ -392,7 +392,9 @@ impl App { self.content.switch_to_populated(); } // https://gitlab.gnome.org/GNOME/gtk/issues/624#note_109968 - Action::RaiseWindow => self.window.present_with_time((glib::get_monotonic_time() / 1000) as u32), + Action::RaiseWindow => self + .window + .present_with_time((glib::get_monotonic_time() / 1000) as u32), } } diff --git a/podcasts-gtk/src/headerbar.rs b/podcasts-gtk/src/headerbar.rs index b72c2cf..44dadc6 100644 --- a/podcasts-gtk/src/headerbar.rs +++ b/podcasts-gtk/src/headerbar.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use gio; use gtk; use gtk::prelude::*; diff --git a/podcasts-gtk/src/i18n.rs b/podcasts-gtk/src/i18n.rs index 3b78f6b..50c5854 100644 --- a/podcasts-gtk/src/i18n.rs +++ b/podcasts-gtk/src/i18n.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - extern crate gettextrs; extern crate regex; use self::gettextrs::gettext; diff --git a/podcasts-gtk/src/main.rs b/podcasts-gtk/src/main.rs index 9bf2341..bdc4857 100644 --- a/podcasts-gtk/src/main.rs +++ b/podcasts-gtk/src/main.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - #![cfg_attr( feature = "cargo-clippy", allow( diff --git a/podcasts-gtk/src/manager.rs b/podcasts-gtk/src/manager.rs index 19f7aaa..d410afe 100644 --- a/podcasts-gtk/src/manager.rs +++ b/podcasts-gtk/src/manager.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use failure::Error; use rayon; diff --git a/podcasts-gtk/src/prefs.rs b/podcasts-gtk/src/prefs.rs index b6dbe7c..fd818c1 100644 --- a/podcasts-gtk/src/prefs.rs +++ b/podcasts-gtk/src/prefs.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use gio; use gio::{Settings, SettingsExt}; use gtk; diff --git a/podcasts-gtk/src/settings.rs b/podcasts-gtk/src/settings.rs index 4585dc4..a46d55a 100644 --- a/podcasts-gtk/src/settings.rs +++ b/podcasts-gtk/src/settings.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use gio; use gio::{Settings, SettingsExt}; use gtk; diff --git a/podcasts-gtk/src/stacks/content.rs b/podcasts-gtk/src/stacks/content.rs index ef86a11..12cf313 100644 --- a/podcasts-gtk/src/stacks/content.rs +++ b/podcasts-gtk/src/stacks/content.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use gtk; use gtk::prelude::*; diff --git a/podcasts-gtk/src/stacks/home.rs b/podcasts-gtk/src/stacks/home.rs index f3a3176..d60ac36 100644 --- a/podcasts-gtk/src/stacks/home.rs +++ b/podcasts-gtk/src/stacks/home.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use gtk; use gtk::prelude::*; use gtk::StackTransitionType; diff --git a/podcasts-gtk/src/stacks/mod.rs b/podcasts-gtk/src/stacks/mod.rs index 83fa633..bcab081 100644 --- a/podcasts-gtk/src/stacks/mod.rs +++ b/podcasts-gtk/src/stacks/mod.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - mod content; mod home; mod populated; diff --git a/podcasts-gtk/src/stacks/populated.rs b/podcasts-gtk/src/stacks/populated.rs index 5e69789..f8dbe12 100644 --- a/podcasts-gtk/src/stacks/populated.rs +++ b/podcasts-gtk/src/stacks/populated.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use gtk; use gtk::prelude::*; use gtk::StackTransitionType; diff --git a/podcasts-gtk/src/stacks/show.rs b/podcasts-gtk/src/stacks/show.rs index a6f194e..a97d796 100644 --- a/podcasts-gtk/src/stacks/show.rs +++ b/podcasts-gtk/src/stacks/show.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use gtk; use gtk::prelude::*; diff --git a/podcasts-gtk/src/static_resource.rs b/podcasts-gtk/src/static_resource.rs index d6f8541..c7fad23 100644 --- a/podcasts-gtk/src/static_resource.rs +++ b/podcasts-gtk/src/static_resource.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use gio::{resources_register, Error, Resource}; use glib::Bytes; diff --git a/podcasts-gtk/src/widgets/aboutdialog.rs b/podcasts-gtk/src/widgets/aboutdialog.rs index 119a0f4..4f19eb4 100644 --- a/podcasts-gtk/src/widgets/aboutdialog.rs +++ b/podcasts-gtk/src/widgets/aboutdialog.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use app::{APP_ID, VERSION}; use gtk; use gtk::prelude::*; diff --git a/podcasts-gtk/src/widgets/appnotif.rs b/podcasts-gtk/src/widgets/appnotif.rs index 0194998..e896763 100644 --- a/podcasts-gtk/src/widgets/appnotif.rs +++ b/podcasts-gtk/src/widgets/appnotif.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use glib; use gtk; use gtk::prelude::*; diff --git a/podcasts-gtk/src/widgets/base_view.rs b/podcasts-gtk/src/widgets/base_view.rs index dacda42..385dd2e 100644 --- a/podcasts-gtk/src/widgets/base_view.rs +++ b/podcasts-gtk/src/widgets/base_view.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use gtk::{self, prelude::*, Adjustment, Orientation, PolicyType}; use utils::smooth_scroll_to; diff --git a/podcasts-gtk/src/widgets/empty.rs b/podcasts-gtk/src/widgets/empty.rs index db06e76..c4ee0d3 100644 --- a/podcasts-gtk/src/widgets/empty.rs +++ b/podcasts-gtk/src/widgets/empty.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use app::APP_ID; use gtk::{self, prelude::*}; use std::ops::Deref; diff --git a/podcasts-gtk/src/widgets/episode.rs b/podcasts-gtk/src/widgets/episode.rs index 5b25edc..d3b6963 100644 --- a/podcasts-gtk/src/widgets/episode.rs +++ b/podcasts-gtk/src/widgets/episode.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use glib; use gtk; use gtk::prelude::*; diff --git a/podcasts-gtk/src/widgets/home_view.rs b/podcasts-gtk/src/widgets/home_view.rs index d4477c3..6683e69 100644 --- a/podcasts-gtk/src/widgets/home_view.rs +++ b/podcasts-gtk/src/widgets/home_view.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use chrono::prelude::*; use failure::Error; diff --git a/podcasts-gtk/src/widgets/mod.rs b/podcasts-gtk/src/widgets/mod.rs index d1e890a..db7f0d9 100644 --- a/podcasts-gtk/src/widgets/mod.rs +++ b/podcasts-gtk/src/widgets/mod.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - mod aboutdialog; pub(crate) mod appnotif; mod base_view; diff --git a/podcasts-gtk/src/widgets/player.rs b/podcasts-gtk/src/widgets/player.rs index 8492255..f769dfc 100644 --- a/podcasts-gtk/src/widgets/player.rs +++ b/podcasts-gtk/src/widgets/player.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use gst::prelude::*; use gst::ClockTime; use gst_player; diff --git a/podcasts-gtk/src/widgets/show.rs b/podcasts-gtk/src/widgets/show.rs index 29c7dc9..eaaa66a 100644 --- a/podcasts-gtk/src/widgets/show.rs +++ b/podcasts-gtk/src/widgets/show.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use glib; use gtk::{self, prelude::*, Adjustment}; diff --git a/podcasts-gtk/src/widgets/show_menu.rs b/podcasts-gtk/src/widgets/show_menu.rs index 138a5e3..980e13c 100644 --- a/podcasts-gtk/src/widgets/show_menu.rs +++ b/podcasts-gtk/src/widgets/show_menu.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use glib; use gtk; use gtk::prelude::*; diff --git a/podcasts-gtk/src/widgets/shows_view.rs b/podcasts-gtk/src/widgets/shows_view.rs index 7030497..905d6ad 100644 --- a/podcasts-gtk/src/widgets/shows_view.rs +++ b/podcasts-gtk/src/widgets/shows_view.rs @@ -17,7 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later - use gtk::{self, prelude::*, Adjustment, Align, SelectionMode}; use crossbeam_channel::Sender;