Skip to content

Commit

Permalink
use from instead of into
Browse files Browse the repository at this point in the history
  • Loading branch information
RCasatta committed Jan 14, 2025
1 parent 67b465b commit 56e03c8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/util/script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ pub trait ScriptToAddr {
#[cfg(not(feature = "liquid"))]
impl ScriptToAddr for bitcoin::Script {
fn to_address_str(&self, network: Network) -> Option<String> {
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()
}
Expand Down

0 comments on commit 56e03c8

Please sign in to comment.