Skip to content

Commit

Permalink
chore: fix dead code warning for 'Sealed' trait and 'sample_floyd2' f…
Browse files Browse the repository at this point in the history
…unc (#799)
  • Loading branch information
bp7968h authored Dec 10, 2024
1 parent f57e31b commit a09fd97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions tower/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ pub use tower_layer::Layer;
pub use tower_service::Service;

#[allow(unreachable_pub)]
#[cfg(any(feature = "balance", feature = "discover", feature = "make"))]
mod sealed {
pub trait Sealed<T> {}
}
Expand Down
1 change: 1 addition & 0 deletions tower/src/util/rng.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ where
///
/// ref: This was borrowed and modified from the following Rand implementation
/// https://github.com/rust-random/rand/blob/b73640705d6714509f8ceccc49e8df996fa19f51/src/seq/index.rs#L375-L411
#[cfg(feature = "balance")]
pub(crate) fn sample_floyd2<R: Rng>(rng: &mut R, length: u64) -> [u64; 2] {
debug_assert!(2 <= length);
let aidx = rng.next_range(0..length - 1);
Expand Down

0 comments on commit a09fd97

Please sign in to comment.