refactor(rust): misc fixes & tidying

This commit is contained in:
Amaan Qureshi 2024-04-09 21:42:59 -04:00
parent 5825e24d56
commit abc7910381
23 changed files with 137 additions and 127 deletions

View file

@ -31,7 +31,7 @@ impl<'a> ReadRecorder<'a> {
pub fn strings_read(&self) -> Vec<&'a str> {
let mut result = Vec::new();
let mut last_range: Option<Range<usize>> = None;
let mut last_range = Option::<Range<usize>>::None;
for index in &self.indices_read {
if let Some(ref mut range) = &mut last_range {
if range.end == *index {

View file

@ -15,7 +15,7 @@ impl Rand {
}
pub fn unsigned(&mut self, max: usize) -> usize {
self.0.gen_range(0..max + 1)
self.0.gen_range(0..=max)
}
pub fn words(&mut self, max_count: usize) -> Vec<u8> {