Skip to content

Commit

Permalink
Use lines() instead of split('\n') in parse_inner (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrob95 authored Jan 3, 2023
1 parent 6b2f981 commit cb3c99d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sqllogictest/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ pub fn parse(script: &str) -> Result<Vec<Record>, ParseError> {

#[allow(clippy::collapsible_match)]
fn parse_inner(loc: &Location, script: &str) -> Result<Vec<Record>, ParseError> {
let mut lines = script.split('\n').enumerate();
let mut lines = script.lines().enumerate();
let mut records = vec![];
let mut conditions = vec![];

Expand Down Expand Up @@ -638,7 +638,7 @@ mod tests {
#[test]
fn test_include_glob() {
let records = parse_file("../examples/include/include_1.slt").unwrap();
assert_eq!(16, records.len());
assert_eq!(15, records.len());
}

#[test]
Expand Down

0 comments on commit cb3c99d

Please sign in to comment.