This commit is contained in:
Edgar 2022-09-08 08:42:37 +02:00
parent 6408ddb6a3
commit 5cf7baad0c
No known key found for this signature in database
GPG key ID: 8731E6C0166EAA85

View file

@ -322,13 +322,13 @@ let data = nom_bencode::parse(b"d3:cow3:moo4:spam4:eggse").unwrap();
let v = data.first().unwrap();
if let Value::Dictionary(dict) = v {
let v = dict.get("cow".as_bytes()).unwrap();
let v = dict.get(b"cow").unwrap();
if let Value::Bytes(data) = v {
assert_eq!(data, b"moo");
}
let v = dict.get("spam".as_bytes()).unwrap();
let v = dict.get(b"spam").unwrap();
if let Value::Bytes(data) = v {
assert_eq!(data, b"eggs");
}