Miscellaneous fixes and test updates for all the other changes
- http::LINE_ENDING is now an &'static str
This commit is contained in:
@@ -9,7 +9,7 @@ pub fn from_one_raw_str<T: str::FromStr>(raw: &[Vec<u8>]) -> Option<T> {
|
||||
return None;
|
||||
}
|
||||
// we JUST checked that raw.len() == 1, so raw[0] WILL exist.
|
||||
match str::from_utf8(unsafe { raw[].unsafe_get(0)[] }) {
|
||||
match str::from_utf8(raw[0][]) {
|
||||
Ok(s) => str::FromStr::from_str(s),
|
||||
Err(_) => None
|
||||
}
|
||||
@@ -22,7 +22,7 @@ pub fn from_comma_delimited<T: str::FromStr>(raw: &[Vec<u8>]) -> Option<Vec<T>>
|
||||
return None;
|
||||
}
|
||||
// we JUST checked that raw.len() == 1, so raw[0] WILL exist.
|
||||
from_one_comma_delimited(unsafe { raw.as_slice().unsafe_get(0).as_slice() })
|
||||
from_one_comma_delimited(raw[0][])
|
||||
}
|
||||
|
||||
/// Reads a comma-delimited raw string into a Vec.
|
||||
|
||||
Reference in New Issue
Block a user