From 3c2e180696d1f66365da64904e88d5d4b8a81d82 Mon Sep 17 00:00:00 2001 From: Crayon Shin-chan Date: Mon, 7 Oct 2024 22:58:32 +0800 Subject: [PATCH] fix: cargo fmt --- psbt/src/lib.rs | 6 +++--- psbt/src/rgb.rs | 2 +- src/descriptor.rs | 2 +- src/errors.rs | 2 +- src/indexers/any.rs | 2 +- src/pay.rs | 2 +- src/wallet.rs | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/psbt/src/lib.rs b/psbt/src/lib.rs index b2ba027..551ccc9 100644 --- a/psbt/src/lib.rs +++ b/psbt/src/lib.rs @@ -28,12 +28,12 @@ use bp::dbc::opret::OpretProof; use bp::dbc::tapret::TapretProof; pub use psbt::*; pub use rgb::*; -use rgbstd::XChain; use rgbstd::containers::{AnchorSet, Batch, CloseMethodSet, Fascia, PubWitness, XPubWitness}; +use rgbstd::XChain; pub use self::rgb::{ - PSBT_GLOBAL_RGB_TRANSITION, PSBT_IN_RGB_CONSUMED_BY, PSBT_OUT_RGB_VELOCITY_HINT, - PSBT_RGB_PREFIX, ProprietaryKeyRgb, RgbExt, RgbInExt, RgbOutExt, RgbPsbtError, + ProprietaryKeyRgb, RgbExt, RgbInExt, RgbOutExt, RgbPsbtError, PSBT_GLOBAL_RGB_TRANSITION, + PSBT_IN_RGB_CONSUMED_BY, PSBT_OUT_RGB_VELOCITY_HINT, PSBT_RGB_PREFIX, }; #[derive(Clone, Eq, PartialEq, Debug, Display, Error)] diff --git a/psbt/src/rgb.rs b/psbt/src/rgb.rs index 5eda371..08a4797 100644 --- a/psbt/src/rgb.rs +++ b/psbt/src/rgb.rs @@ -22,7 +22,7 @@ use std::collections::{BTreeMap, BTreeSet, HashMap}; use amplify::confinement::{Confined, SmallOrdMap, U24}; -use amplify::{FromSliceError, confinement}; +use amplify::{confinement, FromSliceError}; use bp::dbc::Method; use bp::seals::txout::CloseMethod; use commit_verify::mpc; diff --git a/src/descriptor.rs b/src/descriptor.rs index 3097f32..b695f60 100644 --- a/src/descriptor.rs +++ b/src/descriptor.rs @@ -25,8 +25,8 @@ use std::iter; use std::str::FromStr; use amplify::Wrapper; -use bp::dbc::Method; use bp::dbc::tapret::TapretCommitment; +use bp::dbc::Method; use bp::seals::txout::CloseMethod; use bp::{LegacyPk, SigScript, Witness}; use bpstd::{ diff --git a/src/errors.rs b/src/errors.rs index 2de8b23..70bfce9 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -36,7 +36,7 @@ use rgbstd::persistence::{ }; use strict_types::encoding::{DeserializeError, Ident, SerializeError}; -use crate::{TapTweakAlreadyAssigned, validation}; +use crate::{validation, TapTweakAlreadyAssigned}; #[derive(Debug, Display, Error, From)] #[display(inner)] diff --git a/src/indexers/any.rs b/src/indexers/any.rs index bce2c36..08b3b7f 100644 --- a/src/indexers/any.rs +++ b/src/indexers/any.rs @@ -25,9 +25,9 @@ use std::collections::HashMap; use bp::Tx; use bpstd::Network; -use rgbstd::XWitnessId; use rgbstd::containers::Consignment; use rgbstd::validation::{ResolveWitness, WitnessResolverError}; +use rgbstd::XWitnessId; use crate::vm::{WitnessOrd, XWitnessTx}; use crate::{Txid, XChain}; diff --git a/src/pay.rs b/src/pay.rs index ca01ac4..a8ced39 100644 --- a/src/pay.rs +++ b/src/pay.rs @@ -25,7 +25,7 @@ use std::marker::PhantomData; use bp::dbc::tapret::TapretProof; use bp::seals::txout::ExplicitSeal; use bp::{Outpoint, Sats, ScriptPubkey, Vout}; -use bpstd::{Address, psbt}; +use bpstd::{psbt, Address}; use bpwallet::{Wallet, WalletDescr}; use psrgbt::{ Beneficiary as BpBeneficiary, Psbt, PsbtConstructor, PsbtMeta, RgbPsbt, TapretKeyError, diff --git a/src/wallet.rs b/src/wallet.rs index 407662f..0041360 100644 --- a/src/wallet.rs +++ b/src/wallet.rs @@ -26,9 +26,9 @@ use std::path::PathBuf; use bpstd::XpubDerivable; #[cfg(feature = "fs")] -use bpwallet::Wallet; -#[cfg(feature = "fs")] use bpwallet::fs::FsTextStore; +#[cfg(feature = "fs")] +use bpwallet::Wallet; #[cfg(not(target_arch = "wasm32"))] use nonasync::persistence::PersistenceProvider; use psrgbt::{Psbt, PsbtMeta};