From 56e03c81939ec683e01f2929d5b6ad1560f58ba2 Mon Sep 17 00:00:00 2001 From: Riccardo Casatta Date: Tue, 14 Jan 2025 09:32:41 +0100 Subject: [PATCH] use from instead of into --- src/util/script.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/script.rs b/src/util/script.rs index 200c1f97..9f44c4ea 100644 --- a/src/util/script.rs +++ b/src/util/script.rs @@ -27,8 +27,7 @@ pub trait ScriptToAddr { #[cfg(not(feature = "liquid"))] impl ScriptToAddr for bitcoin::Script { fn to_address_str(&self, network: Network) -> Option { - let network: bitcoin::Network = network.into(); - bitcoin::Address::from_script(self, network) + bitcoin::Address::from_script(self, bitcoin::Network::from(network)) .map(|s| s.to_string()) .ok() }