Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit e55bc7d

Browse files
committed
Unboxed closures are used in the fields of core::iter::Map,
1 parent 734a0bf commit e55bc7d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/http/headers/serialization_utils.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ pub fn comma_split(value: &str) -> Vec<String> {
5353
}
5454

5555
pub fn comma_split_iter<'a>(value: &'a str)
56-
-> ::std::iter::Map<'a, &'a str, &'a str, ::std::str::CharSplits<'a, char>> {
57-
value.split(',').map(|w| w.trim_left())
56+
-> ::std::iter::Map<&'a str, &'a str, ::std::str::CharSplits<'a, char>, fn(&str) -> &str> {
57+
fn trim(w: &str) -> &str {w.trim_left()}
58+
59+
value.split(',').map(trim)
5860
}
5961

6062
pub trait WriterUtil: Writer {

0 commit comments

Comments
 (0)