Skip to content

Commit

Permalink
Remove unused fields and lifetimes
Browse files Browse the repository at this point in the history
This fixes some compiler warnings and clippy lints.
  • Loading branch information
robin-nitrokey committed Feb 16, 2025
1 parent 4c77395 commit 1f4f26a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ pub struct Field {
pub member: syn::Member,
pub index: usize,
pub skip_serializing_if: Option<syn::ExprPath>,
// pub attrs: attr::Field,
pub ty: syn::Type,
pub original: syn::Field,
}

fn parse_meta(attrs: &mut StructAttrs, meta: ParseNestedMeta) -> Result<()> {
Expand Down Expand Up @@ -143,8 +140,6 @@ fn fields_from_ast(
}
skip_serializing_if
},
ty: field.ty.clone(),
original: field.clone(),
})
})
.collect()
Expand Down
6 changes: 3 additions & 3 deletions tests/basics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ mod cow {
}
}

const SERIALIZED_LIFETIME_EXAMPLE: &'static [u8] = b"\xa1\x01\x83\x01\x02\x03";
const SERIALIZED_LIFETIME_EXAMPLE: &[u8] = b"\xa1\x01\x83\x01\x02\x03";

#[test]
fn serialize() {
Expand All @@ -261,7 +261,7 @@ mod cow {

assert_eq!(deserialized, example);
let Cow::Owned(_) = deserialized.data else {
panic!("Expected deserialized data Cow::Owned");
};
panic!("Expected deserialized data Cow::Owned");
};
}
}

0 comments on commit 1f4f26a

Please sign in to comment.