Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove dead code #416

Merged
merged 1 commit into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading