Skip to content

Commit b2b33d5

Browse files
LepidopteranSerial-ATA
authored andcommitted
refactor: allow unsafe derive deserialize for *Type enums
1 parent 36a1dff commit b2b33d5

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

lofty/src/file/file_type.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use std::path::Path;
88
/// The type of file read
99
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1010
#[derive(PartialEq, Eq, Copy, Clone, Debug)]
11+
#[allow(clippy::unsafe_derive_deserialize)]
1112
#[allow(missing_docs)]
1213
#[non_exhaustive]
1314
pub enum FileType {

lofty/src/picture.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ pub const APE_PICTURE_TYPES: [&str; 21] = [
4040
/// MIME types for pictures.
4141
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4242
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
43+
#[allow(clippy::unsafe_derive_deserialize)]
4344
#[non_exhaustive]
4445
pub enum MimeType {
4546
/// PNG image
@@ -131,6 +132,7 @@ impl Display for MimeType {
131132

132133
/// The picture type, according to ID3v2 APIC
133134
#[allow(missing_docs)]
135+
#[allow(clippy::unsafe_derive_deserialize)]
134136
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
135137
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
136138
#[non_exhaustive]

lofty/src/tag/tag_type.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use std::path::Path;
1212
/// The tag's format
1313
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1414
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
15+
#[allow(clippy::unsafe_derive_deserialize)]
1516
#[non_exhaustive]
1617
pub enum TagType {
1718
/// This covers both APEv1 and APEv2 as it doesn't matter much

0 commit comments

Comments
 (0)