Skip to content

Commit abc54ef

Browse files
use type method instead of closure for trimming strings in sequence
1 parent bdccc56 commit abc54ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl<'a> FiniteAutomaton<'a> {
6868
fn new(s: &'a str) -> Self {
6969
let mut lines = s
7070
.split('\n')
71-
.map(|line| line.trim())
71+
.map(str::trim)
7272
.filter(|line| !(line.is_empty() || line.starts_with('#')));
7373

7474
let states = lines

0 commit comments

Comments
 (0)