Remove useless use of vec!

Clippy warns of useless use of `vec!` macro, remove it.
This commit is contained in:
Tobin C. Harding 2022-06-07 15:20:07 +10:00
parent d8e82d5cd4
commit 38ff025122
2 changed files with 5 additions and 5 deletions

View File

@ -1002,9 +1002,9 @@ mod tests {
#[test]
fn test_annex_errors() {
assert_eq!(Annex::new(&vec![]), Err(Error::WrongAnnex));
assert_eq!(Annex::new(&vec![0x51]), Err(Error::WrongAnnex));
assert_eq!(Annex::new(&vec![0x51, 0x50]), Err(Error::WrongAnnex));
assert_eq!(Annex::new(&[]), Err(Error::WrongAnnex));
assert_eq!(Annex::new(&[0x51]), Err(Error::WrongAnnex));
assert_eq!(Annex::new(&[0x51, 0x50]), Err(Error::WrongAnnex));
}
fn test_taproot_sighash(

View File

@ -1262,9 +1262,9 @@ mod test {
* 3 55 51
*/
for (script, length) in vec![("51", 3), ("52", 2), ("53", 2), ("54", 2), ("55", 3)] {
for (script, length) in [("51", 3), ("52", 2), ("53", 2), ("54", 2), ("55", 3)].iter() {
assert_eq!(
length,
*length,
tree_info
.script_map
.get(&(Script::from_hex(script).unwrap(), LeafVersion::TapScript))