Merge pull request #215 from pyfisch/fixcommadelimited

Fixes from_one_comma_delimited, no more split at space
This commit is contained in:
Sean McArthur
2014-12-29 14:42:17 -08:00

View File

@@ -31,7 +31,8 @@ pub fn from_one_comma_delimited<T: FromStr>(raw: &[u8]) -> Option<Vec<T>> {
match from_utf8(raw) {
Ok(s) => {
Some(s.as_slice()
.split([',', ' '].as_slice())
.split(',')
.map(|x| x.trim())
.filter_map(FromStr::from_str)
.collect())
}