Skip to content

Commit

Permalink
chore: remove dead code (#416)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored Nov 18, 2023
1 parent b0f3c96 commit 817778b
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 17 deletions.
1 change: 0 additions & 1 deletion crates/dyn-abi/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ impl fmt::Display for Error {
}
}

#[allow(dead_code)]
impl Error {
/// Instantiates a new error with a static str.
pub fn custom(s: impl Into<Cow<'static, str>>) -> Self {
Expand Down
2 changes: 0 additions & 2 deletions crates/sol-macro/src/attr.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(dead_code)]

use heck::{ToKebabCase, ToLowerCamelCase, ToShoutySnakeCase, ToSnakeCase, ToUpperCamelCase};
use proc_macro2::TokenStream;
use quote::quote;
Expand Down
2 changes: 0 additions & 2 deletions crates/sol-macro/src/expand/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,10 @@ impl<'ast> ExpCtxt<'ast> {
utils::selector(self.error_signature(error))
}

#[allow(dead_code)]
fn event_signature(&self, event: &ItemEvent) -> String {
self.signature(event.name.as_string(), &event.params())
}

#[allow(dead_code)]
fn event_selector(&self, event: &ItemEvent) -> ExprArray<u8, 32> {
utils::event_selector(self.event_signature(event))
}
Expand Down
13 changes: 1 addition & 12 deletions crates/syn-solidity/src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::Expr;
use proc_macro2::{Delimiter, TokenStream, TokenTree};
use proc_macro2::{TokenStream, TokenTree};
use std::fmt;
use syn::{parse::ParseStream, punctuated::Punctuated, Result, Token};

Expand All @@ -25,17 +25,6 @@ impl<T: fmt::Debug, P> fmt::Debug for DebugPunctuated<T, P> {
}
}

#[allow(dead_code)]
pub(crate) fn peek_tt(input: ParseStream<'_>) -> Option<TokenTree> {
let tt = input.cursor().token_tree();
tt.and_then(|(tt, _)| match tt {
TokenTree::Group(g) if matches!(g.delimiter(), Delimiter::None) => {
g.stream().into_iter().next()
}
_ => Some(tt),
})
}

pub(crate) fn tts_until_semi(input: ParseStream<'_>) -> TokenStream {
let mut tts = TokenStream::new();
while !input.is_empty() && !input.peek(Token![;]) {
Expand Down

0 comments on commit 817778b

Please sign in to comment.