diff --git a/podcasts-data/Cargo.toml b/podcasts-data/Cargo.toml index 36abecb..aadc08b 100644 --- a/podcasts-data/Cargo.toml +++ b/podcasts-data/Cargo.toml @@ -2,6 +2,7 @@ authors = ["Jordan Petridis "] name = "podcasts-data" version = "0.1.0" +edition = "2018" [dependencies] ammonia = "2.0.0" diff --git a/podcasts-data/src/lib.rs b/podcasts-data/src/lib.rs index fc85259..d320d9e 100644 --- a/podcasts-data/src/lib.rs +++ b/podcasts-data/src/lib.rs @@ -81,7 +81,7 @@ extern crate diesel; #[macro_use] extern crate diesel_migrations; // #[macro_use] -extern crate failure; +// extern crate failure; #[macro_use] extern crate failure_derive; #[macro_use] @@ -89,22 +89,6 @@ extern crate lazy_static; #[macro_use] extern crate log; -extern crate ammonia; -extern crate chrono; -extern crate futures; -extern crate http; -extern crate hyper; -extern crate hyper_tls; -extern crate native_tls; -extern crate num_cpus; -extern crate rayon; -extern crate rfc822_sanitizer; -extern crate rss; -extern crate tokio; -extern crate url; -extern crate xdg; -extern crate xml; - pub mod database; #[allow(missing_docs)] pub mod dbqueries; diff --git a/podcasts-data/src/opml.rs b/podcasts-data/src/opml.rs index bfc609d..b95e2d0 100644 --- a/podcasts-data/src/opml.rs +++ b/podcasts-data/src/opml.rs @@ -21,9 +21,9 @@ // #![allow(unused)] +use crate::dbqueries; use crate::errors::DataError; use crate::models::Source; -use dbqueries; use xml::{ common::XmlVersion, reader, diff --git a/podcasts-downloader/Cargo.toml b/podcasts-downloader/Cargo.toml index 482458a..a2c247e 100644 --- a/podcasts-downloader/Cargo.toml +++ b/podcasts-downloader/Cargo.toml @@ -2,6 +2,7 @@ authors = ["Jordan Petridis "] name = "podcasts-downloader" version = "0.1.0" +edition = "2018" [dependencies] error-chain = "0.12.0" diff --git a/podcasts-downloader/src/lib.rs b/podcasts-downloader/src/lib.rs index 548fe35..9654a25 100644 --- a/podcasts-downloader/src/lib.rs +++ b/podcasts-downloader/src/lib.rs @@ -41,7 +41,6 @@ )] // #![deny(warnings)] -extern crate failure; #[macro_use] extern crate failure_derive; #[macro_use] @@ -51,11 +50,5 @@ extern crate log; #[macro_use] extern crate pretty_assertions; -extern crate glob; -extern crate mime_guess; -extern crate podcasts_data; -extern crate reqwest; -extern crate tempdir; - pub mod downloader; pub mod errors; diff --git a/podcasts-gtk/Cargo.toml b/podcasts-gtk/Cargo.toml index 1ec78f0..e6a5d02 100644 --- a/podcasts-gtk/Cargo.toml +++ b/podcasts-gtk/Cargo.toml @@ -2,6 +2,7 @@ authors = ["Jordan Petridis "] name = "podcasts-gtk" version = "0.1.0" +edition = "2018" [dependencies] chrono = "0.4.6" @@ -9,8 +10,8 @@ crossbeam-channel = "0.3.8" gdk = "0.10.0" gdk-pixbuf = "0.6.0" glib = "0.7.1" -gstreamer = "0.13.0" -gstreamer-player = "0.13.0" +gst = { version = "0.13.0", package = "gstreamer" } +gst-player = { version = "0.13.0", package = "gstreamer-player" } humansize = "1.1.0" lazy_static = "1.3.0" log = "0.4.6" diff --git a/podcasts-gtk/src/app.rs b/podcasts-gtk/src/app.rs index e5ba050..d7caa98 100644 --- a/podcasts-gtk/src/app.rs +++ b/podcasts-gtk/src/app.rs @@ -309,7 +309,7 @@ impl App { Action::RefreshEpisodesViewBGR => self.content.update_home_if_background(), Action::ReplaceWidget(pd) => { let shows = self.content.get_shows(); - let mut pop = shows.borrow().populated(); + let pop = shows.borrow().populated(); pop.borrow_mut() .replace_widget(pd.clone()) .map_err(|err| error!("Failed to update ShowWidget: {}", err)) @@ -318,13 +318,13 @@ impl App { } Action::ShowWidgetAnimated => { let shows = self.content.get_shows(); - let mut pop = shows.borrow().populated(); + let pop = shows.borrow().populated(); pop.borrow_mut() .switch_visible(PopulatedState::Widget, gtk::StackTransitionType::SlideLeft); } Action::ShowShowsAnimated => { let shows = self.content.get_shows(); - let mut pop = shows.borrow().populated(); + let pop = shows.borrow().populated(); pop.borrow_mut() .switch_visible(PopulatedState::View, gtk::StackTransitionType::SlideRight); } diff --git a/podcasts-gtk/src/i18n.rs b/podcasts-gtk/src/i18n.rs index 50c5854..afbec63 100644 --- a/podcasts-gtk/src/i18n.rs +++ b/podcasts-gtk/src/i18n.rs @@ -17,12 +17,10 @@ // // SPDX-License-Identifier: GPL-3.0-or-later -extern crate gettextrs; -extern crate regex; -use self::gettextrs::gettext; -use self::gettextrs::ngettext; -use self::regex::Captures; -use self::regex::Regex; +use gettextrs::gettext; +use gettextrs::ngettext; +use regex::Captures; +use regex::Regex; #[allow(dead_code)] fn freplace(input: String, args: &[&str]) -> String { diff --git a/podcasts-gtk/src/main.rs b/podcasts-gtk/src/main.rs index ba36171..9a00a29 100644 --- a/podcasts-gtk/src/main.rs +++ b/podcasts-gtk/src/main.rs @@ -43,14 +43,6 @@ )] // #![deny(warnings)] -extern crate gdk; -extern crate gdk_pixbuf; -extern crate gio; -extern crate glib; -extern crate gstreamer as gst; -extern crate gstreamer_player as gst_player; -extern crate gtk; - #[macro_use] extern crate failure; // #[macro_use] @@ -64,24 +56,6 @@ extern crate log; #[macro_use] extern crate pretty_assertions; -extern crate chrono; -extern crate crossbeam_channel; -extern crate fragile; -extern crate gettextrs; -extern crate html2text; -extern crate humansize; -extern crate libhandy; -extern crate loggerv; -extern crate mpris_player; -extern crate open; -extern crate podcasts_data; -extern crate podcasts_downloader; -extern crate rayon; -extern crate regex; -extern crate reqwest; -extern crate serde_json; -extern crate url; - use log::Level; use gtk::prelude::*; diff --git a/podcasts-gtk/src/widgets/player.rs b/podcasts-gtk/src/widgets/player.rs index 6ab5cd7..a8adda3 100644 --- a/podcasts-gtk/src/widgets/player.rs +++ b/podcasts-gtk/src/widgets/player.rs @@ -17,9 +17,7 @@ // // SPDX-License-Identifier: GPL-3.0-or-later -use crate::gst::prelude::*; -use crate::gst::ClockTime; -use crate::gst_player; +use gst::ClockTime; use gtk; use gtk::prelude::*; diff --git a/rustfmt.toml b/rustfmt.toml deleted file mode 100644 index 32a9786..0000000 --- a/rustfmt.toml +++ /dev/null @@ -1 +0,0 @@ -edition = "2018"