Skip to content

Commit f7e696e

Browse files
committed
Remove useless use of vec!
Clippy warns of useless use of `vec!` macro, remove it.
1 parent 740d499 commit f7e696e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/util/sighash.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,9 +1002,9 @@ mod tests {
10021002

10031003
#[test]
10041004
fn test_annex_errors() {
1005-
assert_eq!(Annex::new(&vec![]), Err(Error::WrongAnnex));
1006-
assert_eq!(Annex::new(&vec![0x51]), Err(Error::WrongAnnex));
1007-
assert_eq!(Annex::new(&vec![0x51, 0x50]), Err(Error::WrongAnnex));
1005+
assert_eq!(Annex::new(&[]), Err(Error::WrongAnnex));
1006+
assert_eq!(Annex::new(&[0x51]), Err(Error::WrongAnnex));
1007+
assert_eq!(Annex::new(&[0x51, 0x50]), Err(Error::WrongAnnex));
10081008
}
10091009

10101010
fn test_taproot_sighash(

src/util/taproot.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,9 +1262,9 @@ mod test {
12621262
* 3 55 51
12631263
*/
12641264

1265-
for (script, length) in vec![("51", 3), ("52", 2), ("53", 2), ("54", 2), ("55", 3)] {
1265+
for (script, length) in [("51", 3), ("52", 2), ("53", 2), ("54", 2), ("55", 3)].iter() {
12661266
assert_eq!(
1267-
length,
1267+
*length,
12681268
tree_info
12691269
.script_map
12701270
.get(&(Script::from_hex(script).unwrap(), LeafVersion::TapScript))

0 commit comments

Comments
 (0)