Skip to content

Commit

Permalink
quick check.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachelint committed Sep 1, 2024
1 parent 5d2ac01 commit 128b5ff
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -644,21 +644,21 @@ impl<T> Index<usize> for Blocks<T> {
type Output = T;

fn index(&self, index: usize) -> &T {
if index < self.previous.len() {
&self.previous[index]
} else {
self.current.as_ref().unwrap()
}
// if index < self.previous.len() {
// &self.previous[index]
// } else {
self.current.as_ref().unwrap()
// }
}
}

impl<T> IndexMut<usize> for Blocks<T> {
fn index_mut(&mut self, index: usize) -> &mut T {
if index < self.previous.len() {
&mut self.previous[index]
} else {
self.current.as_mut().unwrap()
}
// if index < self.previous.len() {
// &mut self.previous[index]
// } else {
self.current.as_mut().unwrap()
// }
}
}

Expand Down

0 comments on commit 128b5ff

Please sign in to comment.