Skip to content

Commit

Permalink
Fix new clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
csnover committed Dec 11, 2023
1 parent 6331d09 commit 2f6d9fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions binrw_derive/src/binrw/codegen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ fn generate_trait_impl<const WRITE: bool>(
let args_lifetime = get_args_lifetime(Span::call_site());
quote! {
#[automatically_derived]
#[allow(non_snake_case)]
#[allow(non_snake_case, unknown_lints)]
#[allow(clippy::redundant_closure_call)]
impl #impl_generics #trait_name for #name #ty_generics #where_clause {
type Args<#args_lifetime> = #arg_type;
Expand Down Expand Up @@ -322,7 +322,7 @@ fn directives_to_args(field: &StructField, stream: &TokenStream) -> TokenStream
quote_spanned_any! {count.span()=>
count: {
let #TEMP = #count;
#[allow(clippy::useless_conversion)]
#[allow(clippy::useless_conversion, clippy::unnecessary_fallible_conversions)]
usize::try_from(#TEMP).map_err(|_| {
extern crate alloc;
#BIN_ERROR::AssertFail {
Expand Down
2 changes: 2 additions & 0 deletions binrw_derive/src/binrw/parser/types/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ use crate::{
use proc_macro2::TokenStream;
use quote::ToTokens;

// Lint: Makes code less clear
#[allow(clippy::enum_variant_names)]
#[derive(Clone, Debug)]
pub(crate) enum Map {
None,
Expand Down

0 comments on commit 2f6d9fa

Please sign in to comment.