Skip to content

Commit

Permalink
pre_processing: local varname change segments -> chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
hesampakdaman committed May 12, 2024
1 parent d8d640b commit 58eca26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pre_processing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ impl<'a> Splitter<'a> {
}

fn partition(mut self) -> Partition {
let mut segments = Vec::new();
let mut chunks = Vec::new();
let mut offset = 0;
while self.bytes.len() > 0 {
let end = self.get_chunk_end();
chunks.push(offset..offset + end);
self.bytes = &self.bytes[end..];
segments.push(offset..offset + end);
offset += end;
}
Partition { chunks: segments }
Partition { chunks }
}

fn get_chunk_end(&mut self) -> usize {
Expand Down

0 comments on commit 58eca26

Please sign in to comment.