From 959628ed83cc3785b068be9c839347ced8e5bf2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 5 May 2019 13:29:14 +0200 Subject: [PATCH] Bug 1549301 - Fix some warnings. --- servo/components/derive_common/lib.rs | 1 - servo/components/style/error_reporting.rs | 1 - servo/components/style/servo/selector_parser.rs | 1 - servo/components/style_derive/animate.rs | 2 +- 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/servo/components/derive_common/lib.rs b/servo/components/derive_common/lib.rs index 1e8d20aa32de..14415351449b 100644 --- a/servo/components/derive_common/lib.rs +++ b/servo/components/derive_common/lib.rs @@ -3,7 +3,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ extern crate darling; -extern crate proc_macro; extern crate proc_macro2; #[macro_use] extern crate quote; diff --git a/servo/components/style/error_reporting.rs b/servo/components/style/error_reporting.rs index 04677c260411..6e63b0ad68a3 100644 --- a/servo/components/style/error_reporting.rs +++ b/servo/components/style/error_reporting.rs @@ -245,7 +245,6 @@ impl ParseErrorReporter for RustLogReporter { location: SourceLocation, error: ContextualParseError, ) { - use log; if log_enabled!(log::Level::Info) { info!( "Url:\t{}\n{}:{} {}", diff --git a/servo/components/style/servo/selector_parser.rs b/servo/components/style/servo/selector_parser.rs index a67f97025b76..9d94c467b583 100644 --- a/servo/components/style/servo/selector_parser.rs +++ b/servo/components/style/servo/selector_parser.rs @@ -345,7 +345,6 @@ impl NonTSPseudoClass { /// selector matching, and it's set from the DOM. pub fn state_flag(&self) -> ElementState { use self::NonTSPseudoClass::*; - use crate::element_state::ElementState; match *self { Active => ElementState::IN_ACTIVE_STATE, Focus => ElementState::IN_FOCUS_STATE, diff --git a/servo/components/style_derive/animate.rs b/servo/components/style_derive/animate.rs index ccccdf9d0df8..16c3ee122722 100644 --- a/servo/components/style_derive/animate.rs +++ b/servo/components/style_derive/animate.rs @@ -25,7 +25,7 @@ pub fn derive(mut input: DeriveInput) -> TokenStream { let s = Structure::new(&input); let mut append_error_clause = s.variants().len() > 1; - let mut match_body = s.variants().iter().fold(quote!(), |body, variant| { + let match_body = s.variants().iter().fold(quote!(), |body, variant| { let arm = match derive_variant_arm(variant, &mut where_clause) { Ok(arm) => arm, Err(()) => {