From 0ae487e4de74b28388f40eb05f381dd248a0a7a1 Mon Sep 17 00:00:00 2001 From: Andrey Tkachenko Date: Fri, 12 Oct 2018 15:27:51 +0400 Subject: [PATCH] Fix warnings --- maple-core/src/callback.rs | 2 +- maple-core/src/lib.rs | 2 +- maple-examples/examples/simple.rs | 1 - maple-macro/src/lib.rs | 3 --- maple-macro/src/node.rs | 2 -- maple-macro/src/tag.rs | 4 ++-- maple/src/lib.rs | 1 - 7 files changed, 4 insertions(+), 11 deletions(-) diff --git a/maple-core/src/callback.rs b/maple-core/src/callback.rs index 62e8d96..7e1e380 100644 --- a/maple-core/src/callback.rs +++ b/maple-core/src/callback.rs @@ -23,7 +23,7 @@ impl Callback for Callback1 { type Arg = A; - fn call(&self, arg: Self::Arg) { + fn call(&self, _arg: Self::Arg) { } } diff --git a/maple-core/src/lib.rs b/maple-core/src/lib.rs index 45bba87..ee1ca6a 100644 --- a/maple-core/src/lib.rs +++ b/maple-core/src/lib.rs @@ -1,4 +1,4 @@ -#![feature(proc_macro, associated_type_defaults, never_type, unsize, specialization)] +#![feature(associated_type_defaults, never_type, unsize, specialization)] pub mod convert; pub mod engine; diff --git a/maple-examples/examples/simple.rs b/maple-examples/examples/simple.rs index fad12c8..723b43c 100644 --- a/maple-examples/examples/simple.rs +++ b/maple-examples/examples/simple.rs @@ -1,7 +1,6 @@ #![feature(proc_macro_hygiene)] #![allow(dead_code)] -#[macro_use] extern crate maple; extern crate maple_stdweb_dom; diff --git a/maple-macro/src/lib.rs b/maple-macro/src/lib.rs index 3d8a366..a70699b 100644 --- a/maple-macro/src/lib.rs +++ b/maple-macro/src/lib.rs @@ -6,8 +6,6 @@ mod tag; #[macro_use] extern crate syn; - -#[macro_use] extern crate quote; extern crate proc_macro; @@ -17,7 +15,6 @@ use quote::*; use self::node::Node; use self::attribute::{Attribute, AttributeValue}; -use self::tag::Tag; fn visit_attribute(ident: &Ident, attr: &Attribute, _ctx: &TypePath) -> impl ToTokens { let attr_name = &attr.name; diff --git a/maple-macro/src/node.rs b/maple-macro/src/node.rs index 81c0848..2b5daf0 100644 --- a/maple-macro/src/node.rs +++ b/maple-macro/src/node.rs @@ -1,6 +1,4 @@ use syn::parse::{Parse, ParseStream, Result}; -use quote::ToTokens; - use crate::tag::Tag; #[derive(Debug)] diff --git a/maple-macro/src/tag.rs b/maple-macro/src/tag.rs index eeb965f..8718795 100644 --- a/maple-macro/src/tag.rs +++ b/maple-macro/src/tag.rs @@ -14,8 +14,8 @@ impl Parse for Tag { fn parse(input: ParseStream) -> Result { let mut attrs: Vec = Vec::new(); let mut children: Vec = Vec::new(); - let mut open_path: TypePath; - let mut close_path: TypePath; + let open_path: TypePath; + let close_path: TypePath; // parsing opening "<" input.parse::()?; diff --git a/maple/src/lib.rs b/maple/src/lib.rs index 072c869..f6eb723 100644 --- a/maple/src/lib.rs +++ b/maple/src/lib.rs @@ -1,4 +1,3 @@ -#[macro_use] extern crate maple_core; pub mod prelude {