Skip to content

Commit a09fd97

Browse files
authored
chore: fix dead code warning for 'Sealed' trait and 'sample_floyd2' func (#799)
1 parent f57e31b commit a09fd97

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

tower/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ pub use tower_layer::Layer;
219219
pub use tower_service::Service;
220220

221221
#[allow(unreachable_pub)]
222+
#[cfg(any(feature = "balance", feature = "discover", feature = "make"))]
222223
mod sealed {
223224
pub trait Sealed<T> {}
224225
}

tower/src/util/rng.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ where
116116
///
117117
/// ref: This was borrowed and modified from the following Rand implementation
118118
/// https://github.com/rust-random/rand/blob/b73640705d6714509f8ceccc49e8df996fa19f51/src/seq/index.rs#L375-L411
119+
#[cfg(feature = "balance")]
119120
pub(crate) fn sample_floyd2<R: Rng>(rng: &mut R, length: u64) -> [u64; 2] {
120121
debug_assert!(2 <= length);
121122
let aidx = rng.next_range(0..length - 1);

0 commit comments

Comments
 (0)