* Add Rustfmt

* Add Taplo
This commit is contained in:
daxpedda
2022-01-05 21:19:02 -08:00
committed by GitHub
parent 36f0a55518
commit 47a26a19c5
30 changed files with 698 additions and 554 deletions
+4 -5
View File
@@ -6,22 +6,21 @@
// of this source tree.
use core::cmp::min;
use rand::{CryptoRng, Error, RngCore};
use std::vec::Vec;
use rand::{CryptoRng, Error, RngCore};
/// A simple implementation of `RngCore` for testing purposes.
///
/// This generates a cyclic sequence (i.e. cycles over an initial buffer)
///
///
#[derive(Clone, Debug)]
pub struct CycleRng {
v: Vec<u8>,
}
impl CycleRng {
/// Create a `CycleRng`, yielding a sequence starting with
/// `initial` and looping thereafter
/// Create a `CycleRng`, yielding a sequence starting with `initial` and
/// looping thereafter
pub fn new(initial: Vec<u8>) -> Self {
CycleRng { v: initial }
}