run rustfmt on src/uu/shuf/src/shuf.rs

This commit is contained in:
Sylvestre Ledru 2024-11-28 18:13:49 +01:00
parent 75de5a0613
commit 29de3ee43c

View file

@ -279,7 +279,10 @@ impl<'a> Shufable for Vec<&'a [u8]> {
// this is safe. // this is safe.
(**self).choose(rng).unwrap() (**self).choose(rng).unwrap()
} }
type PartialShuffleIterator<'b> = std::iter::Copied<std::slice::Iter<'b, &'a [u8]>> where Self: 'b; type PartialShuffleIterator<'b>
= std::iter::Copied<std::slice::Iter<'b, &'a [u8]>>
where
Self: 'b;
fn partial_shuffle<'b>( fn partial_shuffle<'b>(
&'b mut self, &'b mut self,
rng: &'b mut WrappedRng, rng: &'b mut WrappedRng,
@ -298,7 +301,10 @@ impl Shufable for RangeInclusive<usize> {
fn choose(&self, rng: &mut WrappedRng) -> usize { fn choose(&self, rng: &mut WrappedRng) -> usize {
rng.gen_range(self.clone()) rng.gen_range(self.clone())
} }
type PartialShuffleIterator<'b> = NonrepeatingIterator<'b> where Self: 'b; type PartialShuffleIterator<'b>
= NonrepeatingIterator<'b>
where
Self: 'b;
fn partial_shuffle<'b>( fn partial_shuffle<'b>(
&'b mut self, &'b mut self,
rng: &'b mut WrappedRng, rng: &'b mut WrappedRng,