Skip to content

Commit

Permalink
Removed unused functions (#83)
Browse files Browse the repository at this point in the history
* Removed unused functions

* fix
  • Loading branch information
arduano authored Aug 5, 2024
1 parent 2f805fa commit 3bafd84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 40 deletions.
3 changes: 3 additions & 0 deletions core/src/voice.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#![allow(dead_code)]
#![allow(non_camel_case_types)] // For the SIMD library

mod envelopes;
pub(crate) use envelopes::*;

Expand Down
40 changes: 0 additions & 40 deletions soundfonts/src/sfz/grammar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,6 @@ bnf! {
ParseOpcodeValuePart = text:(parse_opcode_value_simd);
}

impl<'a> Root<'a> {
pub fn parse_full(s: &'a str) -> Result<Self, ParseError> {
let parser = StringParser::new(s);
let result = Self::parse(parser);

result.map(|(r, _)| r)
}
}

impl<'a> ErrorTolerantRoot<'a> {
pub fn parse_full(s: &'a str) -> Result<Self, ParseError> {
let parser = StringParser::new(s);
let result = Self::parse(parser);

result.map(|(r, _)| r)
}
}

impl<'a> OpcodeValue<'a> {
pub fn as_string(&self) -> Cow<'a, str> {
if self.rest.is_empty() {
Expand All @@ -88,28 +70,6 @@ impl<'a> OpcodeValue<'a> {
}
}

impl<'a> Token<'a> {
pub fn parse_as_iter(s: &'a str) -> impl Iterator<Item = Result<Token<'a>, ParseError>> {
let mut parser = StringParser::new(s);
std::iter::from_fn(move || {
let result = Self::parse(parser);

if let Err(e) = result {
if parser.is_empty() {
return None;
} else {
return Some(Err(e));
}
}

Some(result.map(|(r, p)| {
parser = p;
r
}))
})
}
}

impl<'a> ErrorTolerantToken<'a> {
pub fn parse_as_iter(s: &'a str) -> impl Iterator<Item = Result<Token<'a>, ParseError>> {
let mut parser = StringParser::new(s);
Expand Down

0 comments on commit 3bafd84

Please sign in to comment.