You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let mut encoder = Encoder::new();
let headers = vec![
(b":method".to_vec(), b"GET".to_vec()),
(b":path".to_vec(), b"/".to_vec()),
];
// The headers are encoded by providing their index (with a bit flag
// indicating that the indexed representation is used).
assert_eq!(encoder.encode(&headers), vec![2 | 0x80, 4 | 0x80]);
Gives the error with 0.3.0 crate version:
Updating crates.io index
Compiling hpack v0.3.0
Compiling test_hpack_1 v0.1.0 (/at/rust/workspace/test_hpack_1)
error[E0271]: type mismatch resolving `<&std::vec::Vec<(std::vec::Vec<u8>, std::vec::Vec<u8>)> as std::iter::IntoIterator>::Item == (&[u8], &[u8])`
--> test_hpack_1/src/main.rs:13:20
|
13 | assert_eq!(encoder.encode(&headers), vec![2 | 0x80, 4 | 0x80]);
| ^^^^^^ expected reference, found tuple
|
= note: expected type `&(std::vec::Vec<u8>, std::vec::Vec<u8>)`
found type `(&[u8], &[u8])`
The text was updated successfully, but these errors were encountered:
Gives the error with 0.3.0 crate version:
The text was updated successfully, but these errors were encountered: