Bug 1549301 - Fix some warnings.

This commit is contained in:
Emilio Cobos Álvarez 2019-05-05 13:29:14 +02:00
Родитель a465f73789
Коммит 959628ed83
4 изменённых файлов: 1 добавлений и 4 удалений

Просмотреть файл

@ -3,7 +3,6 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
extern crate darling; extern crate darling;
extern crate proc_macro;
extern crate proc_macro2; extern crate proc_macro2;
#[macro_use] #[macro_use]
extern crate quote; extern crate quote;

Просмотреть файл

@ -245,7 +245,6 @@ impl ParseErrorReporter for RustLogReporter {
location: SourceLocation, location: SourceLocation,
error: ContextualParseError, error: ContextualParseError,
) { ) {
use log;
if log_enabled!(log::Level::Info) { if log_enabled!(log::Level::Info) {
info!( info!(
"Url:\t{}\n{}:{} {}", "Url:\t{}\n{}:{} {}",

Просмотреть файл

@ -345,7 +345,6 @@ impl NonTSPseudoClass {
/// selector matching, and it's set from the DOM. /// selector matching, and it's set from the DOM.
pub fn state_flag(&self) -> ElementState { pub fn state_flag(&self) -> ElementState {
use self::NonTSPseudoClass::*; use self::NonTSPseudoClass::*;
use crate::element_state::ElementState;
match *self { match *self {
Active => ElementState::IN_ACTIVE_STATE, Active => ElementState::IN_ACTIVE_STATE,
Focus => ElementState::IN_FOCUS_STATE, Focus => ElementState::IN_FOCUS_STATE,

Просмотреть файл

@ -25,7 +25,7 @@ pub fn derive(mut input: DeriveInput) -> TokenStream {
let s = Structure::new(&input); let s = Structure::new(&input);
let mut append_error_clause = s.variants().len() > 1; 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) { let arm = match derive_variant_arm(variant, &mut where_clause) {
Ok(arm) => arm, Ok(arm) => arm,
Err(()) => { Err(()) => {