From 9237156a292f621661e1b72a8a2c86cdc269cefd Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 15 Nov 2023 13:29:21 +1100 Subject: [PATCH] Fix decoder usage --- src/v0/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/v0/mod.rs b/src/v0/mod.rs index a9368a7..623f233 100644 --- a/src/v0/mod.rs +++ b/src/v0/mod.rs @@ -543,7 +543,7 @@ mod tests { use bitcoin::{ScriptBuf, Witness}; use super::*; - use crate::raw; + use crate::{io, raw}; use crate::serialize::{Deserialize, Serialize}; #[track_caller] @@ -714,8 +714,7 @@ mod tests { ..Default::default() }; - let ser = &expected.serialize_map(); - let mut decoder = std::io::Cursor::new(&ser); + let mut decoder = io::Cursor::new(expected.serialize_map()); let actual = Output::decode(&mut decoder).unwrap(); assert_eq!(expected, actual);