Skip to content

Commit e2aeb7a

Browse files
committed
Cargo fmt
1 parent fd818bc commit e2aeb7a

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

protocol/src/constants.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ pub struct ChainAnchor {
1616
pub height: u32,
1717
}
1818

19-
pub const RESERVED_SPACES: [&'static [u8]; 3] = [
20-
b"\x07example",
21-
b"\x04test",
22-
b"\x04local",
23-
];
19+
pub const RESERVED_SPACES: [&'static [u8]; 3] = [b"\x07example", b"\x04test", b"\x04local"];
2420

2521
/// The number of blocks between each rollout of new spaces for auction.
2622
pub const ROLLOUT_BLOCK_INTERVAL: u32 = 144;

protocol/src/script.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ use bitcoin::{
1212
use serde::{Deserialize, Serialize};
1313

1414
use crate::{
15+
constants::RESERVED_SPACES,
1516
hasher::{KeyHasher, SpaceKey},
1617
prepare::DataSource,
1718
slabel::{SLabel, SLabelRef},
1819
validate::RejectParams,
1920
FullSpaceOut,
2021
};
21-
use crate::constants::RESERVED_SPACES;
2222

2323
/// Ways that a script might fail. Not everything is split up as
2424
/// much as it could be; patches welcome if more detailed errors
@@ -140,7 +140,10 @@ impl SpaceScript {
140140
}
141141
let name = name.unwrap();
142142

143-
if RESERVED_SPACES.iter().any(|reserved| *reserved == name.as_ref()) {
143+
if RESERVED_SPACES
144+
.iter()
145+
.any(|reserved| *reserved == name.as_ref())
146+
{
144147
return Ok(Err(ScriptError::ReservedName));
145148
}
146149

wallet/src/builder.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,4 +1006,3 @@ pub fn space_dust(amount: Amount) -> Amount {
10061006
pub fn is_space_dust(amount: Amount) -> bool {
10071007
amount.to_sat() % 10 == 6
10081008
}
1009-

wallet/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@ use serde::{ser::SerializeSeq, Deserialize, Deserializer, Serialize, Serializer}
4141

4242
use crate::{
4343
address::SpaceAddress,
44-
builder::{is_space_dust, SpacesAwareCoinSelection},
44+
builder::{is_connector_dust, is_space_dust, SpacesAwareCoinSelection},
4545
};
46-
use crate::builder::is_connector_dust;
4746

4847
pub extern crate bdk_wallet;
4948
pub extern crate bitcoin;

0 commit comments

Comments
 (0)