Skip to content

Commit

Permalink
Removed useless imports of Default
Browse files Browse the repository at this point in the history
  • Loading branch information
Kixunil committed Aug 10, 2021
1 parent 57aa818 commit 26fcd93
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 11 deletions.
3 changes: 0 additions & 3 deletions src/blockdata/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

use crate::prelude::*;

use core::default::Default;

use crate::hashes::hex::{HexIterator, Error as HexError};
use crate::hashes::sha256d;
use crate::blockdata::opcodes;
Expand Down Expand Up @@ -165,7 +163,6 @@ pub fn genesis_block(network: Network) -> Block {

#[cfg(test)]
mod test {
use core::default::Default;
use crate::hashes::hex::FromHex;

use crate::network::constants::Network;
Expand Down
2 changes: 1 addition & 1 deletion src/blockdata/script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
use crate::prelude::*;

use crate::io;
use core::{fmt, default::Default};
use core::fmt;

#[cfg(feature = "serde")] use serde;

Expand Down
2 changes: 1 addition & 1 deletion src/blockdata/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
use crate::prelude::*;

use crate::io;
use core::{fmt, str, default::Default};
use core::fmt;
#[cfg(feature = "std")] use std::error;

use crate::hashes::{self, Hash, sha256d};
Expand Down
1 change: 0 additions & 1 deletion src/network/message_blockdata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ mod tests {
use crate::hashes::hex::FromHex;

use crate::consensus::encode::{deserialize, serialize};
use core::default::Default;

#[test]
fn getblocks_message_test() {
Expand Down
6 changes: 3 additions & 3 deletions src/util/amount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

use crate::prelude::*;

use core::{ops, default, str::FromStr, cmp::Ordering};
use core::{ops, str::FromStr, cmp::Ordering};
use core::fmt::{self, Write};

/// A set of denominations in which amounts can be expressed.
Expand Down Expand Up @@ -424,7 +424,7 @@ impl Amount {
}
}

impl default::Default for Amount {
impl Default for Amount {
fn default() -> Self {
Amount::ZERO
}
Expand Down Expand Up @@ -749,7 +749,7 @@ impl SignedAmount {
}
}

impl default::Default for SignedAmount {
impl Default for SignedAmount {
fn default() -> Self {
SignedAmount::ZERO
}
Expand Down
2 changes: 1 addition & 1 deletion src/util/bip32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use crate::prelude::*;

use core::{fmt, str::FromStr, default::Default};
use core::{fmt, str::FromStr};
#[cfg(feature = "std")] use std::error;
#[cfg(feature = "serde")] use serde;

Expand Down
2 changes: 1 addition & 1 deletion src/util/psbt/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ macro_rules! impl_psbtmap_consensus_decoding {
fn consensus_decode<D: $crate::io::Read>(
mut d: D,
) -> Result<Self, $crate::consensus::encode::Error> {
let mut rv: Self = core::default::Default::default();
let mut rv: Self = Default::default();

loop {
match $crate::consensus::Decodable::consensus_decode(&mut d) {
Expand Down

0 comments on commit 26fcd93

Please sign in to comment.