Skip to content

Commit

Permalink
More clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
hedgecrw committed Oct 2, 2024
1 parent 93bcbb2 commit a972db2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions musicxml/src/elements/credit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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" => {
Expand Down Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions musicxml/src/elements/direction_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ pub enum DirectionTypeContents {
}

impl ContentDeserializer for DirectionTypeContents {
#[allow(clippy::too_many_lines)]
fn deserialize(elements: &[XmlElement]) -> Result<Self, String> {
Ok(if let Some(element) = elements.first() {
match element.name.as_str() {
Expand Down
1 change: 1 addition & 0 deletions musicxml/src/elements/part_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion musicxml/src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ fn write_musicxml_file<T: Write>(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)
Expand Down

0 comments on commit a972db2

Please sign in to comment.