diff --git a/src/header/mod.rs b/src/header/mod.rs index 349407f4..c6149ba5 100644 --- a/src/header/mod.rs +++ b/src/header/mod.rs @@ -661,8 +661,9 @@ mod tests { // hashmap's iterators have arbitrary order, so we must sort first let mut pieces = s.split("\r\n").collect::>(); pieces.sort(); - let s = pieces.into_iter().rev().collect::>().join("\r\n"); - assert_eq!(s, "Host: foo.bar\r\nContent-Length: 15\r\n"); + assert_eq!(pieces.len(), 2); + assert_eq!(pieces[0], "Host: foo.bar"); + assert_eq!(pieces[1], "Content-Length: 15"); } #[test]