Rustfmt net_traits crate

This commit is contained in:
Pyfisch 2018-11-03 16:18:44 +01:00
parent f512e262a5
commit d41be1d56d
10 changed files with 229 additions and 131 deletions

View file

@ -70,11 +70,17 @@ where
let s = str::from_utf8(&digits[..]).unwrap();
fmt.write_str(s.trim_right_matches('0'))
}
},
}
}
}
pub fn quality_to_value(q: Vec<QualityItem<Mime>>) -> HeaderValue {
HeaderValue::from_str(&q.iter().map(|q| q.to_string()).collect::<Vec<String>>().join(", ")).unwrap()
HeaderValue::from_str(
&q.iter()
.map(|q| q.to_string())
.collect::<Vec<String>>()
.join(", "),
)
.unwrap()
}