refactor(rust): misc fixes & tidying
This commit is contained in:
parent
5825e24d56
commit
abc7910381
23 changed files with 137 additions and 127 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue