Skip to content

Commit eb603f4

Browse files
committed
fix: clippy warnings from current stable 1.71.0
1 parent b706f0b commit eb603f4

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/commands.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ pub enum CliSubCommand {
146146
/// Backend Node operation subcommands.
147147
#[derive(Debug, Subcommand, Clone, PartialEq, Eq)]
148148
#[clap(rename_all = "lower")]
149-
#[cfg(any(feature = "regtest-node"))]
149+
#[cfg(feature = "regtest-node")]
150150
pub enum NodeSubCommand {
151151
/// Get info.
152152
GetInfo,

src/handlers.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ where
180180
let (psbt, details) = tx_builder.finish()?;
181181
if wallet_opts.verbose {
182182
Ok(
183-
json!({"psbt": base64::encode(&serialize(&psbt)),"details": details, "serialized_psbt": psbt}),
183+
json!({"psbt": base64::encode(serialize(&psbt)),"details": details, "serialized_psbt": psbt}),
184184
)
185185
} else {
186-
Ok(json!({"psbt": base64::encode(&serialize(&psbt)),"details": details}))
186+
Ok(json!({"psbt": base64::encode(serialize(&psbt)),"details": details}))
187187
}
188188
}
189189
BumpFee {
@@ -217,7 +217,7 @@ where
217217
}
218218

219219
let (psbt, details) = tx_builder.finish()?;
220-
Ok(json!({"psbt": base64::encode(&serialize(&psbt)),"details": details,}))
220+
Ok(json!({"psbt": base64::encode(serialize(&psbt)),"details": details,}))
221221
}
222222
Policies => Ok(json!({
223223
"external": wallet.policies(KeychainKind::External)?,
@@ -232,7 +232,7 @@ where
232232
assume_height,
233233
trust_witness_utxo,
234234
} => {
235-
let psbt = base64::decode(&psbt).map_err(|e| Error::Generic(e.to_string()))?;
235+
let psbt = base64::decode(psbt).map_err(|e| Error::Generic(e.to_string()))?;
236236
let mut psbt: PartiallySignedTransaction = deserialize(&psbt)?;
237237
let signopt = SignOptions {
238238
assume_height,
@@ -242,14 +242,14 @@ where
242242
let finalized = wallet.sign(&mut psbt, signopt)?;
243243
if wallet_opts.verbose {
244244
Ok(
245-
json!({"psbt": base64::encode(&serialize(&psbt)),"is_finalized": finalized, "serialized_psbt": psbt}),
245+
json!({"psbt": base64::encode(serialize(&psbt)),"is_finalized": finalized, "serialized_psbt": psbt}),
246246
)
247247
} else {
248-
Ok(json!({"psbt": base64::encode(&serialize(&psbt)),"is_finalized": finalized,}))
248+
Ok(json!({"psbt": base64::encode(serialize(&psbt)),"is_finalized": finalized,}))
249249
}
250250
}
251251
ExtractPsbt { psbt } => {
252-
let psbt = base64::decode(&psbt).map_err(|e| Error::Generic(e.to_string()))?;
252+
let psbt = base64::decode(psbt).map_err(|e| Error::Generic(e.to_string()))?;
253253
let psbt: PartiallySignedTransaction = deserialize(&psbt)?;
254254
Ok(json!({"raw_tx": serialize_hex(&psbt.extract_tx()),}))
255255
}
@@ -258,7 +258,7 @@ where
258258
assume_height,
259259
trust_witness_utxo,
260260
} => {
261-
let psbt = base64::decode(&psbt).map_err(|e| Error::Generic(e.to_string()))?;
261+
let psbt = base64::decode(psbt).map_err(|e| Error::Generic(e.to_string()))?;
262262
let mut psbt: PartiallySignedTransaction = deserialize(&psbt)?;
263263

264264
let signopt = SignOptions {
@@ -269,10 +269,10 @@ where
269269
let finalized = wallet.finalize_psbt(&mut psbt, signopt)?;
270270
if wallet_opts.verbose {
271271
Ok(
272-
json!({ "psbt": base64::encode(&serialize(&psbt)),"is_finalized": finalized, "serialized_psbt": psbt}),
272+
json!({ "psbt": base64::encode(serialize(&psbt)),"is_finalized": finalized, "serialized_psbt": psbt}),
273273
)
274274
} else {
275-
Ok(json!({ "psbt": base64::encode(&serialize(&psbt)),"is_finalized": finalized,}))
275+
Ok(json!({ "psbt": base64::encode(serialize(&psbt)),"is_finalized": finalized,}))
276276
}
277277
}
278278
CombinePsbt { psbt } => {
@@ -297,7 +297,7 @@ where
297297
Ok(acc)
298298
},
299299
)?;
300-
Ok(json!({ "psbt": base64::encode(&serialize(&final_psbt)) }))
300+
Ok(json!({ "psbt": base64::encode(serialize(&final_psbt)) }))
301301
}
302302
}
303303
}
@@ -510,7 +510,7 @@ pub(crate) fn handle_key_subcommand(
510510
.map_err(|e| SignerError::from(e))?;
511511
let descriptors: HWIDescriptor<String> = client.get_descriptors(None)
512512
.map_err(|e| SignerError::from(e))?;
513-
Ok(json!({"device": device.model, "receiving": descriptors.receive[0].to_string(), "change": descriptors.internal[0]}))
513+
Ok(json!({"device": device.model, "receiving": descriptors.receive[0].to_string(), "change": descriptors.internal[0]}))
514514
}).collect::<Result<Vec<_>, Error>>()?;
515515
Ok(json!(descriptors))
516516
}

0 commit comments

Comments
 (0)