Skip to content

Commit 908b21c

Browse files
committed
remove unused default features
1 parent 5783141 commit 908b21c

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

stacks-common/Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,26 @@ name = "stacks_common"
3030
path = "./src/libcommon.rs"
3131

3232
[dependencies]
33-
chrono = "0.4.19"
34-
curve25519-dalek = { version = "4.1.3", features = ["serde"] }
33+
chrono = { version = "0.4.41", default-features = false, features = ["clock"] }
34+
curve25519-dalek = { version = "4.1.3", default-features = false, features = ["serde"] }
3535
ed25519-dalek = { workspace = true }
3636
hashbrown = { workspace = true }
3737
lazy_static = { workspace = true }
38-
rand = { workspace = true, optional = true }
39-
ripemd = "0.1.1"
38+
ripemd = { version = "0.1.1", default-features = false }
4039
serde = { workspace = true , features = ["derive"] }
4140
serde_derive = { workspace = true }
4241
serde_json = { workspace = true }
43-
sha3 = "0.10.1"
42+
sha3 = { version = "0.10.1", default-features = false }
4443
slog = { workspace = true }
45-
slog-term = "2.6.0"
44+
slog-term = { version = "2.6.0", default-features = false }
4645

4746
# Optional dependencies
48-
slog-json = { version = "2.3.0", optional = true }
4947
getrandom = { version = "0.2", default-features = false, optional = true }
48+
rand = { workspace = true, optional = true }
49+
slog-json = { version = "2.3.0", default-features = false, optional = true }
5050

5151
[target.'cfg(unix)'.dependencies]
52-
nix = {version = "0.23", optional = true}
52+
nix = {version = "0.23", default-features = false, optional = true}
5353

5454
[target.'cfg(windows)'.dependencies]
5555
winapi = { version = "0.3", features = [
@@ -60,7 +60,7 @@ winapi = { version = "0.3", features = [
6060
], optional = true }
6161

6262
[target.'cfg(not(target_family = "wasm"))'.dependencies]
63-
secp256k1 = { version = "0.24.3", features = ["serde", "recovery"] }
63+
secp256k1 = { version = "0.24.3", default-features = false, features = ["std","serde", "recovery"] }
6464
rusqlite = { workspace = true, optional = true }
6565

6666
[target.'cfg(target_family = "wasm")'.dependencies]

stacks-common/src/deps_common/bitcoin/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
//! software.
2626
//!
2727
28-
// Clippy flags
29-
#![allow(clippy::needless_range_loop)] // suggests making a big mess of array newtypes
30-
3128
// Coding conventions
3229
#![deny(non_upper_case_globals)]
3330
#![deny(non_camel_case_types)]

stacks-common/src/libcommon.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#![allow(non_snake_case)]
55
#![allow(non_upper_case_globals)]
66
#![cfg_attr(test, allow(unused_variables, unused_assignments))]
7-
#![allow(clippy::assertions_on_constants)]
87

98
#[allow(unused_imports)]
109
#[macro_use(o, slog_log, slog_trace, slog_debug, slog_info, slog_warn, slog_error)]

stacks-common/src/types/chainstate.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,12 @@ impl SortitionId {
168168
write!(hasher, "{pox}").expect("Failed to deserialize PoX ID into the hasher");
169169
let h = Sha512Trunc256Sum::from_hasher(hasher);
170170
let s = SortitionId(h.0);
171-
test_debug!("SortitionId({}) = {} + {}", &s, bhh, pox);
172-
s
171+
// The `test_debug!` macro will expand to nothing on release builds.
172+
#[allow(clippy::let_and_return)]
173+
{
174+
test_debug!("SortitionId({}) = {} + {}", &s, bhh, pox);
175+
s
176+
}
173177
}
174178
}
175179
}

stacks-common/src/util/secp256k1/native.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ mod tests {
609609
let key = Secp256k1PublicKey::from_hex(fixture.public_key).unwrap();
610610
let signature = MessageSignature::from_raw(&hex_bytes(fixture.signature).unwrap());
611611
let ver_res = key.verify(&hex_bytes(fixture.data).unwrap(), &signature);
612+
#[allow(clippy::assertions_on_constants)]
612613
match (ver_res, fixture.result) {
613614
(Ok(true), Ok(true)) => {}
614615
(Ok(false), Ok(false)) => {}

0 commit comments

Comments
 (0)