From a972db2af6f967eda00e8406af8dfab3a6c8ae18 Mon Sep 17 00:00:00 2001 From: Will Hedgecock Date: Wed, 2 Oct 2024 10:13:35 -0500 Subject: [PATCH] More clippy --- musicxml/src/elements/credit.rs | 5 +++-- musicxml/src/elements/direction_type.rs | 1 + musicxml/src/elements/part_list.rs | 1 + musicxml/src/parser/mod.rs | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/musicxml/src/elements/credit.rs b/musicxml/src/elements/credit.rs index f65fad7..23ad86c 100644 --- a/musicxml/src/elements/credit.rs +++ b/musicxml/src/elements/credit.rs @@ -55,12 +55,12 @@ impl ContentDeserializer for CreditTextContents { match element.name.as_str() { "link" => { if let Some(content) = subcontents.as_mut() { - content.link.push(Link::deserialize(element)?) + content.link.push(Link::deserialize(element)?); } } "bookmark" => { if let Some(content) = subcontents.as_mut() { - content.bookmark.push(Bookmark::deserialize(element)?) + content.bookmark.push(Bookmark::deserialize(element)?); } } "credit-words" => { @@ -91,6 +91,7 @@ impl ContentDeserializer for CreditTextContents { } /// Contents of the [CreditSubcontents] element. +#[allow(clippy::large_enum_variant)] #[derive(Debug, PartialEq, Eq)] pub enum CreditSubcontents { /// The [CreditImageContents] element specifies the appearance of an image within a credit. diff --git a/musicxml/src/elements/direction_type.rs b/musicxml/src/elements/direction_type.rs index a58010e..f9532bf 100644 --- a/musicxml/src/elements/direction_type.rs +++ b/musicxml/src/elements/direction_type.rs @@ -69,6 +69,7 @@ pub enum DirectionTypeContents { } impl ContentDeserializer for DirectionTypeContents { + #[allow(clippy::too_many_lines)] fn deserialize(elements: &[XmlElement]) -> Result { Ok(if let Some(element) = elements.first() { match element.name.as_str() { diff --git a/musicxml/src/elements/part_list.rs b/musicxml/src/elements/part_list.rs index b2bccf9..0af94d8 100644 --- a/musicxml/src/elements/part_list.rs +++ b/musicxml/src/elements/part_list.rs @@ -4,6 +4,7 @@ use musicxml_internal::*; use musicxml_macros::*; /// The [PartListElement] specifies all possible elements available for use in a [PartList] element. +#[allow(clippy::large_enum_variant)] #[derive(Debug, PartialEq, Eq)] pub enum PartListElement { /// The [PartGroup] element indicates a group of parts that is bracketed together. diff --git a/musicxml/src/parser/mod.rs b/musicxml/src/parser/mod.rs index 8a3d365..bda26df 100644 --- a/musicxml/src/parser/mod.rs +++ b/musicxml/src/parser/mod.rs @@ -91,7 +91,7 @@ fn write_musicxml_file(file: &mut T, xml: &XmlElement, pretty_print: b } #[cfg(feature = "std")] -fn write_musicxml_to_file(path: &str, xml: &XmlElement, compressed: bool, pretty_print: bool) -> Result<(), String> { +fn write_musicxml_to_file(path: &str, xml: &XmlElement, _compressed: bool, pretty_print: bool) -> Result<(), String> { /*if compressed { let options = zip::write::SimpleFileOptions::default() .compression_method(zip::CompressionMethod::Deflated)