fix(rustup): str.split and associated type changes
This commit is contained in:
@@ -13,7 +13,7 @@ pub struct Language{
|
||||
impl FromStr for Language {
|
||||
type Err = ();
|
||||
fn from_str(s: &str) -> Result<Language, ()> {
|
||||
let mut i = s.split_str("-");
|
||||
let mut i = s.split("-");
|
||||
let p = i.next();
|
||||
let s = i.next();
|
||||
match (p, s) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use header::{self, Encoding};
|
||||
use header::Encoding;
|
||||
|
||||
/// The `Transfer-Encoding` header.
|
||||
///
|
||||
|
||||
@@ -645,7 +645,7 @@ mod tests {
|
||||
|
||||
let s = headers.to_string();
|
||||
// hashmap's iterators have arbitrary order, so we must sort first
|
||||
let mut pieces = s.split_str("\r\n").collect::<Vec<&str>>();
|
||||
let mut pieces = s.split("\r\n").collect::<Vec<&str>>();
|
||||
pieces.sort();
|
||||
let s = pieces.into_iter().rev().collect::<Vec<&str>>().connect("\r\n");
|
||||
assert_eq!(s, "Host: foo.bar\r\nContent-Length: 15\r\n");
|
||||
|
||||
Reference in New Issue
Block a user