Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
chinedufn committed Mar 6, 2019
1 parent e124a87 commit edd4122
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion crates/html-macro/src/parser/braced.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::parser::HtmlParser;
use crate::tag::{Tag, TagKind};
use proc_macro2::{Ident, Span};
use proc_macro2::Span;
use quote::quote;
use syn::spanned::Spanned;
use syn::Block;
Expand Down
7 changes: 3 additions & 4 deletions crates/html-macro/src/parser/close_tag.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
use crate::parser::{is_self_closing, HtmlParser};
use crate::tag::TagKind;
use proc_macro2::{Ident, Span};
use quote::{quote, quote_spanned};
use proc_macro2::Ident;
use quote::quote_spanned;

impl HtmlParser {
/// Parse an incoming Tag::Close
pub(crate) fn parse_close_tag(&mut self, name: &Ident, first_angle_bracket_span: &Span) {
pub(crate) fn parse_close_tag(&mut self, name: &Ident) {
let parent_stack = &mut self.parent_stack;

let close_span = name.span();
Expand Down
8 changes: 2 additions & 6 deletions crates/html-macro/src/parser/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::tag::TagKind;
use crate::Tag;
use proc_macro2::{LineColumn, TokenStream};
use quote::{quote, quote_spanned};
use std::collections::HashMap;
use syn::export::Span;
Expand Down Expand Up @@ -74,11 +73,8 @@ impl HtmlParser {
self.parse_open_tag(name, closing_bracket_span, attrs);
self.last_tag_kind = Some(TagKind::Open);
}
Tag::Close {
name,
first_angle_bracket_span,
} => {
self.parse_close_tag(name, first_angle_bracket_span);
Tag::Close { name, .. } => {
self.parse_close_tag(name);
self.last_tag_kind = Some(TagKind::Close);
}
Tag::Text {
Expand Down
2 changes: 1 addition & 1 deletion crates/html-macro/src/parser/open_tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl HtmlParser {
Expr::Closure(closure) => {
// TODO: Use this to decide Box<FnMut(_, _, _, ...)
// After we merge the DomUpdater
let arg_count = closure.inputs.len();
let _arg_count = closure.inputs.len();

let add_closure = quote! {
#[cfg(target_arch = "wasm32")]
Expand Down
1 change: 0 additions & 1 deletion crates/html-macro/src/parser/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use crate::parser::HtmlParser;
use crate::tag::{Tag, TagKind};
use proc_macro2::{Ident, Span};
use quote::quote;
use std::cmp::max;

impl HtmlParser {
/// Parse an incoming Tag::Text text node
Expand Down
1 change: 0 additions & 1 deletion crates/html-macro/src/tag.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use proc_macro2::{Span, TokenStream, TokenTree};
use std::thread::current;
use syn::parse::{Parse, ParseStream, Result};
use syn::spanned::Spanned;
use syn::token::Brace;
Expand Down

0 comments on commit edd4122

Please sign in to comment.