Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
MyBlackMIDIScore committed Oct 6, 2024
1 parent 80353a3 commit 1d90570
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions soundfonts/src/sfz/grammar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ bnf! {
impl<'a> OpcodeValue<'a> {
pub fn as_string(&self) -> Cow<'a, str> {
if self.rest.is_empty() {
return Cow::Borrowed(self.first.value.text.text);
Cow::Borrowed(self.first.value.text.text)
} else {
let mut result = String::from(self.first.value.text.text);
for part in self.rest.iter() {
result.push_str(part.value.text.text);
}
return Cow::Owned(result);
Cow::Owned(result)
}
}
}
Expand Down

0 comments on commit 1d90570

Please sign in to comment.