/// Parse a line from the Difficulty section. This just checks to see if the chart is a 7k chart.
Parse a line from the Difficulty section. This just checks to see if the chart is a 7k chart.
Parse a line from the Difficulty section . This just checks to see if the chart is a 7k chart .
fn parse_difficulty(line: &str) -> Result<(), ParseError> {
    let (k, v) = line.split_at(match line.find(':') {
        Some(n) => n,
        None => {
            return Err(ParseError::Parse(
                String::from("Malformed key/value pair"),
                None,
            ))
        }
    });
    let v = &v[1..];
    if k == "CircleSize" && v != "7" {
        Err(ParseError::Parse(
            String::from("This chart is not 7 key"),
            None,
        ))
    } else {
        Ok(())
    }
}
fn parse_difficulty ( line : & str ) -> Result < ( ) , ParseError > { let ( k , v ) = line . split_at ( match line . find ( ':' ) { Some ( n ) => n , None => { return Err ( ParseError :: Parse ( String :: from ( " " ) , None , ) ) } } ) ; let v = & v [ 1 .. ] ; if k == " " && v != " " { Err ( ParseError :: Parse ( String :: from ( " " ) , None , ) ) } else { Ok ( ( ) ) } }
Parse a line from the Difficulty section.
Parse a line from the Difficulty section .
line
&str