From 3b2c9109dd2c16e3812feb06f322ff0e6b6a61a0 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Sat, 5 Nov 2022 11:51:45 +0100 Subject: [PATCH] Clippy fixes Clippy just broke under our feets by enabling more checks and making CI fail... --- src/descriptors.rs | 6 +++--- src/jsonrpc/api.rs | 2 +- src/jsonrpc/server.rs | 2 +- src/lib.rs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/descriptors.rs b/src/descriptors.rs index 40fabdc2..2dc6e300 100644 --- a/src/descriptors.rs +++ b/src/descriptors.rs @@ -20,7 +20,7 @@ use serde::{Deserialize, Serialize}; #[derive(Debug)] pub enum DescCreationError { InsaneTimelock(u32), - InvalidKey(descriptor::DescriptorPublicKey), + InvalidKey(Box), Miniscript(miniscript::Error), IncompatibleDesc, DerivedKeyParsing, @@ -233,7 +233,7 @@ impl str::FromStr for MultipathDescriptor { } }); if let Some(key) = invalid_key { - return Err(DescCreationError::InvalidKey(key)); + return Err(DescCreationError::InvalidKey(key.into())); } // Semantic of the Miniscript must be either the owner now, or the heir after @@ -334,7 +334,7 @@ impl MultipathDescriptor { .iter() .find(|k| !is_valid_desc_key(k)) { - return Err(DescCreationError::InvalidKey((**key).clone())); + return Err(DescCreationError::InvalidKey((**key).clone().into())); } let owner_pk = Miniscript::from_ast(Terminal::Check(sync::Arc::from( diff --git a/src/jsonrpc/api.rs b/src/jsonrpc/api.rs index dd0e3a8a..0d034643 100644 --- a/src/jsonrpc/api.rs +++ b/src/jsonrpc/api.rs @@ -52,7 +52,7 @@ fn update_spend(control: &DaemonControl, params: Params) -> Result