perf(all): replace &str.to_string() with .to_owned()
This commit is contained in:
@@ -114,7 +114,7 @@ mod tests {
|
||||
let mut stream = BufReader::new(mock);
|
||||
|
||||
let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
|
||||
assert_eq!(read_to_string(req).unwrap(), "".to_string());
|
||||
assert_eq!(read_to_string(req).unwrap(), "".to_owned());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -131,7 +131,7 @@ mod tests {
|
||||
let mut stream = BufReader::new(mock);
|
||||
|
||||
let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
|
||||
assert_eq!(read_to_string(req).unwrap(), "".to_string());
|
||||
assert_eq!(read_to_string(req).unwrap(), "".to_owned());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -148,7 +148,7 @@ mod tests {
|
||||
let mut stream = BufReader::new(mock);
|
||||
|
||||
let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
|
||||
assert_eq!(read_to_string(req).unwrap(), "".to_string());
|
||||
assert_eq!(read_to_string(req).unwrap(), "".to_owned());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -189,7 +189,7 @@ mod tests {
|
||||
None => panic!("Transfer-Encoding: chunked expected!"),
|
||||
};
|
||||
// The content is correctly read?
|
||||
assert_eq!(read_to_string(req).unwrap(), "qwert".to_string());
|
||||
assert_eq!(read_to_string(req).unwrap(), "qwert".to_owned());
|
||||
}
|
||||
|
||||
/// Tests that when a chunk size is not a valid radix-16 number, an error
|
||||
@@ -261,7 +261,7 @@ mod tests {
|
||||
|
||||
let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
|
||||
|
||||
assert_eq!(read_to_string(req).unwrap(), "1".to_string());
|
||||
assert_eq!(read_to_string(req).unwrap(), "1".to_owned());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user