Skip to content

Commit 78ad15c

Browse files
committed
Merge rust-bitcoin#4718: fuzz: Use script Display
a795e6d fuzz: Use script Display (Tobin C. Harding) Pull request description: `Sritp::fmt_asm` is deprecated, use `Display` instead. ACKs for top commit: apoelstra: ACK a795e6d; successfully ran local tests Tree-SHA512: 85b209771f5084355c25452342e09a707d9267191ed85e68c6d8f8c28fb1bf383cb91179f561f0376e6d41509d8d067fe4817d5c29491f69befa7a2171c3631a
2 parents 1357997 + a795e6d commit 78ad15c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fuzz/fuzz_targets/bitcoin/script_bytes_to_asm_fmt.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
use std::fmt;
1+
use std::fmt::{self, Write as _};
22

3-
use bitcoin::script::ScriptExt as _;
43
use honggfuzz::fuzz;
54

65
// faster than String, we don't need to actually produce the value, just check absence of panics
@@ -14,7 +13,8 @@ impl fmt::Write for NullWriter {
1413

1514
fn do_test(data: &[u8]) {
1615
let mut writer = NullWriter;
17-
bitcoin::Script::from_bytes(data).fmt_asm(&mut writer).unwrap();
16+
let script = bitcoin::Script::from_bytes(data);
17+
write!(writer, "{script}").unwrap();
1818
}
1919

2020
fn main() {

0 commit comments

Comments
 (0)