Skip to content

Commit 9e7300c

Browse files
committed
fix some warnings on various feature enablement
1 parent 6c155b4 commit 9e7300c

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

src/rng.rs

+3-13
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
1+
#![allow(dead_code)] // Keeps our cfg's from becoming too convoluted in here
2+
13
trait Rng {
2-
#[allow(dead_code)]
34
fn u128() -> u128;
4-
5-
#[allow(dead_code)]
65
fn u64() -> u64;
7-
8-
#[allow(dead_code)]
96
fn u16() -> u16;
107
}
118

12-
#[cfg(any(feature = "v4", feature = "v7"))]
139
pub(crate) fn u128() -> u128 {
1410
imp::RngImp::u128()
1511
}
1612

17-
#[cfg(feature = "v7")]
1813
pub(crate) fn u64() -> u64 {
1914
imp::RngImp::u64()
2015
}
2116

22-
#[cfg(any(feature = "v1", feature = "v6"))]
2317
pub(crate) fn u16() -> u16 {
2418
imp::RngImp::u16()
2519
}
@@ -212,11 +206,7 @@ mod imp {
212206
}
213207
}
214208

215-
#[cfg(all(
216-
feature = "js",
217-
not(feature = "rng-rand"),
218-
not(feature = "rng-getrandom")
219-
))]
209+
#[cfg(feature = "js")]
220210
mod webcrypto {
221211
/*
222212
This module preserves the stabilized behavior of `uuid` that requires the

0 commit comments

Comments
 (0)