Fix tests.

This commit is contained in:
Heiko Schaefer 2021-07-02 00:04:00 +02:00
parent b427a9d2e7
commit 308210e615
2 changed files with 5 additions and 4 deletions

View file

@ -112,7 +112,7 @@ mod test {
0x1,
];
let ai = AlgoInfo::try_from(data.to_vec()).unwrap();
let ai = AlgoInfo::try_from(&data[..]).unwrap();
assert_eq!(
ai,
@ -206,7 +206,7 @@ mod test {
0xd,
];
let ai = AlgoInfo::try_from(data.to_vec()).unwrap();
let ai = AlgoInfo::try_from(&data[..]).unwrap();
assert_eq!(
ai,
@ -360,7 +360,7 @@ mod test {
0x4, 0x1, 0x97, 0x55, 0x1, 0x5, 0x1,
];
let ai = AlgoInfo::try_from(data.to_vec()).unwrap();
let ai = AlgoInfo::try_from(&data[..]).unwrap();
assert_eq!(
ai,

View file

@ -101,12 +101,13 @@ mod test {
use crate::parse::extended_cap::{ExtendedCap, Features};
use hex_literal::hex;
use std::collections::HashSet;
use std::convert::TryFrom;
use std::iter::FromIterator;
#[test]
fn test_ec() {
let data = hex!("7d 00 0b fe 08 00 00 ff 00 00");
let ec = ExtendedCap::from(&data).unwrap();
let ec = ExtendedCap::try_from(&data[..]).unwrap();
assert_eq!(
ec,