Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Commit bf16f62

Browse files
1 parent 3b5388e commit bf16f62

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

acronym/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::convert::identity;
2+
13
pub fn abbreviate(term: &str) -> String {
24
term.chars()
35
.scan(None::<char>, |previous, character| {
@@ -12,7 +14,7 @@ pub fn abbreviate(term: &str) -> String {
1214

1315
Some(letter)
1416
})
15-
.filter_map(/* Pending RFC 2306 */ |l| l)
17+
.filter_map(identity)
1618
.flat_map(char::to_uppercase)
1719
.collect()
1820
}

0 commit comments

Comments
 (0)