Skip to content

Commit

Permalink
Use str::lines() instead of splitting and stripping for the #124 repr…
Browse files Browse the repository at this point in the history
…o case.
  • Loading branch information
bodil authored Jul 27, 2020
1 parent d8d8198 commit 2cae6fb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ord/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2381,8 +2381,7 @@ mod test {
fn issue_124() {
let mut map = OrdMap::new();
let contents = include_str!("test-fixtures/issue_124.txt");
for line in contents.split('\n') {
let line = line.trim();
for line in contents.lines() {
if line.starts_with("insert ") {
map.insert(line[7..].parse::<u32>().unwrap(), 0);
} else if line.starts_with("remove ") {
Expand Down

0 comments on commit 2cae6fb

Please sign in to comment.