fn next_line<T: BufRead>(reader: &mut Lines<T>) -> Result<Option<String>, std::io::Error> {
    let mut buffer = String::new();
    for line in reader {
        let line = line?;
        if !line.trim().ends_with('\\') {
            if buffer.is_empty() {
                return Ok(Some(line));
            } else {
                buffer.push_str(&line);
                return Ok(Some(buffer));
            }
        } else {
            buffer.push_str(&line[0..line.len() - 1]);
        }
    }
    Ok(None)
}
// Helper to read multiline rules from a file.
Helper to read multiline rules from a file.
Helper to read multiline rules from a file .
fn next_line<T: BufRead>(reader: &mut Lines<T>) -> Result<Option<String>, std::io::Error> {
    let mut buffer = String::new();
    for line in reader {
        let line = line?;
        if !line.trim().ends_with('\\') {
            if buffer.is_empty() {
                return Ok(Some(line));
            } else {
                buffer.push_str(&line);
                return Ok(Some(buffer));
            }
        } else {
            buffer.push_str(&line[0..line.len() - 1]);
        }
    }
    Ok(None)
}
fn next_line < T : BufRead > ( reader : & mut Lines < T > ) -> Result < Option < String > , std :: io :: Error > { let mut buffer = String :: new ( ) ; for line in reader { let line = line ? ; if ! line . trim ( ) . ends_with ( '\\' ) { if buffer . is_empty ( ) { return Ok ( Some ( line ) ) ; } else { buffer . push_str ( & line ) ; return Ok ( Some ( buffer ) ) ; } } else { buffer . push_str ( & line [ 0 .. line . len ( ) - 1 ] ) ; } } Ok ( None ) }
Helper to read multiline rules from a file.
Helper to read multiline rules from a file .
reader
&mut Lines<T>