Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
calebzulawski committed Mar 15, 2024
1 parent 36c7d1a commit 559dc16
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion multiversion-macros/src/multiversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::dispatcher::{DispatchMethod, Dispatcher};
use crate::target::Target;
use proc_macro2::{Span, TokenStream};
use quote::ToTokens;
use std::{collections::HashMap, convert::TryFrom};
use std::collections::HashMap;
use syn::{
parse::Parser, parse_quote, punctuated::Punctuated, spanned::Spanned, token::Comma, Error,
ItemFn, Lit, LitStr, Meta, NestedMeta, ReturnType, Type,
Expand Down
1 change: 0 additions & 1 deletion multiversion-macros/src/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ pub(crate) fn make_target_fn(target: LitStr, func: ItemFn) -> Result<TokenStream
#[cfg(test)]
mod test {
use super::*;
use proc_macro2::Span;

#[test]
fn parse_architecture() {}
Expand Down
16 changes: 2 additions & 14 deletions multiversion-macros/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,10 @@ use proc_macro2::{Span, TokenStream};
use quote::quote;
use syn::{
parse_quote, spanned::Spanned, visit_mut::VisitMut, BareFnArg, Error, Expr, FnArg,
GenericParam, Ident, Item, Lifetime, Pat, PatIdent, PatType, Result, ReturnType, Signature,
Type, TypeBareFn,
GenericParam, Ident, Lifetime, Pat, PatIdent, PatType, Result, ReturnType, Signature, Type,
TypeBareFn,
};

struct HasSelfType(bool);

impl VisitMut for HasSelfType {
fn visit_ident_mut(&mut self, ident: &mut Ident) {
self.0 |= ident == "Self"
}

fn visit_item_mut(&mut self, _: &mut Item) {
// Nested items may have `Self` tokens
}
}

pub(crate) fn arg_exprs(sig: &Signature) -> Vec<Expr> {
sig.inputs
.iter()
Expand Down

0 comments on commit 559dc16

Please sign in to comment.