Skip to content

Commit

Permalink
chore: remove syn "full" feature (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored Jun 4, 2023
1 parent 8d086af commit 3e1e57e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion crates/sol-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ syn-solidity.workspace = true

proc-macro2.workspace = true
quote.workspace = true
syn = { workspace = true, features = ["full", "extra-traits"] }
syn = { workspace = true, features = ["extra-traits"] }
tiny-keccak = { workspace = true, features = ["keccak"] }
5 changes: 2 additions & 3 deletions crates/syn-solidity/src/attribute/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use std::{
use syn::{
ext::IdentExt,
parse::{Parse, ParseStream},
spanned::Spanned,
token::{Brace, Bracket},
Error, Ident, Result, Token,
};
Expand Down Expand Up @@ -141,9 +140,9 @@ impl FunctionAttribute {
match self {
Self::Visibility(v) => v.span(),
Self::Mutability(m) => m.span(),
Self::Virtual(v) => v.span(),
Self::Virtual(v) => v.span,
Self::Override(o) => o.span(),
Self::Immutable(i) => i.span(),
Self::Immutable(i) => i.span,
Self::Modifier(m) => m.span(),
}
}
Expand Down
19 changes: 9 additions & 10 deletions crates/syn-solidity/src/attribute/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use syn::{
parenthesized,
parse::{Parse, ParseStream},
punctuated::Punctuated,
spanned::Spanned,
token::Paren,
Result, Token,
};
Expand Down Expand Up @@ -64,10 +63,10 @@ impl Parse for Visibility {
impl Visibility {
pub fn span(&self) -> Span {
match self {
Self::External(kw) => kw.span(),
Self::Public(kw) => kw.span(),
Self::Internal(kw) => kw.span(),
Self::Private(kw) => kw.span(),
Self::External(kw) => kw.span,
Self::Public(kw) => kw.span,
Self::Internal(kw) => kw.span,
Self::Private(kw) => kw.span,
}
}

Expand Down Expand Up @@ -100,7 +99,7 @@ impl Visibility {
}

/// A mutability attribute.
#[derive(Clone, PartialEq, Eq, Hash)]
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
pub enum Mutability {
/// `pure`
Pure(kw::pure),
Expand Down Expand Up @@ -144,10 +143,10 @@ impl Parse for Mutability {
impl Mutability {
pub fn span(&self) -> Span {
match self {
Self::Pure(kw) => kw.span(),
Self::View(kw) => kw.span(),
Self::Constant(kw) => kw.span(),
Self::Payable(kw) => kw.span(),
Self::Pure(kw) => kw.span,
Self::View(kw) => kw.span,
Self::Constant(kw) => kw.span,
Self::Payable(kw) => kw.span,
}
}

Expand Down
5 changes: 2 additions & 3 deletions crates/syn-solidity/src/attribute/variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use std::{
};
use syn::{
parse::{Parse, ParseStream},
spanned::Spanned,
Error, Result,
};

Expand Down Expand Up @@ -104,9 +103,9 @@ impl VariableAttribute {
pub fn span(&self) -> Span {
match self {
Self::Visibility(v) => v.span(),
Self::Constant(c) => c.span(),
Self::Constant(c) => c.span,
Self::Override(o) => o.span(),
Self::Immutable(i) => i.span(),
Self::Immutable(i) => i.span,
}
}

Expand Down

0 comments on commit 3e1e57e

Please sign in to comment.