fix: Cargo clippy lints after rust 1.78

This commit is contained in:
Daniela Brozzoni
2024-05-02 14:53:37 +02:00
parent 08fac47c29
commit a5fb7fdf50
5 changed files with 13 additions and 7 deletions

View File

@@ -53,7 +53,8 @@
//! # Ok::<_, Box<dyn std::error::Error>>(())
//! ```
use alloc::string::{String, ToString};
use alloc::string::String;
use core::fmt;
use core::str::FromStr;
use serde::{Deserialize, Serialize};
@@ -79,9 +80,9 @@ pub struct FullyNodedExport {
pub label: String,
}
impl ToString for FullyNodedExport {
fn to_string(&self) -> String {
serde_json::to_string(self).unwrap()
impl fmt::Display for FullyNodedExport {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", serde_json::to_string(self).unwrap())
}
}
@@ -213,6 +214,7 @@ impl FullyNodedExport {
mod test {
use core::str::FromStr;
use crate::std::string::ToString;
use bdk_chain::{BlockId, ConfirmationTime};
use bitcoin::hashes::Hash;
use bitcoin::{transaction, BlockHash, Network, Transaction};