Bug 1549301 - Fix some warnings.
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sun, 05 May 2019 13:29:14 +0200
changeset 531482 c818610cbef536fcff8e3ec58643d8ff8323a4e8
parent 531481 c92e192e8fe4e7af7fde967d248754c9c6161652
child 531483 6cd597096672810d108eb89d7f65fbdf5474306b
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1549301
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1549301 - Fix some warnings.
servo/components/derive_common/lib.rs
servo/components/style/error_reporting.rs
servo/components/style/servo/selector_parser.rs
servo/components/style_derive/animate.rs
--- a/servo/components/derive_common/lib.rs
+++ b/servo/components/derive_common/lib.rs
@@ -1,14 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * 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;
 #[macro_use]
 extern crate syn;
 extern crate synstructure;
 
 pub mod cg;
--- a/servo/components/style/error_reporting.rs
+++ b/servo/components/style/error_reporting.rs
@@ -240,17 +240,16 @@ pub struct RustLogReporter;
 #[cfg(feature = "servo")]
 impl ParseErrorReporter for RustLogReporter {
     fn report_error(
         &self,
         url: &UrlExtraData,
         location: SourceLocation,
         error: ContextualParseError,
     ) {
-        use log;
         if log_enabled!(log::Level::Info) {
             info!(
                 "Url:\t{}\n{}:{} {}",
                 url.as_str(),
                 location.line,
                 location.column,
                 error
             )
--- a/servo/components/style/servo/selector_parser.rs
+++ b/servo/components/style/servo/selector_parser.rs
@@ -340,17 +340,16 @@ impl Visit for NonTSPseudoClass {
     }
 }
 
 impl NonTSPseudoClass {
     /// Gets a given state flag for this pseudo-class. This is used to do
     /// 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,
             Fullscreen => ElementState::IN_FULLSCREEN_STATE,
             Hover => ElementState::IN_HOVER_STATE,
             Enabled => ElementState::IN_ENABLED_STATE,
             Disabled => ElementState::IN_DISABLED_STATE,
             Checked => ElementState::IN_CHECKED_STATE,
--- a/servo/components/style_derive/animate.rs
+++ b/servo/components/style_derive/animate.rs
@@ -20,17 +20,17 @@ pub fn derive(mut input: DeriveInput) ->
                 parse_quote!(#param: crate::values::animated::Animate),
             );
         }
     }
     let (mut match_body, append_error_clause) = {
         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(()) => {
                     append_error_clause = true;
                     return body;
                 },
             };
             quote! { #body #arm }