Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvmanila committed Nov 28, 2023
1 parent f920cc4 commit 2676a44
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/ruff_notebook/src/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,10 @@ impl CellOffsets {
/// Panics if the offset is less than the last offset pushed.
pub(crate) fn push(&mut self, offset: TextSize) {
if let Some(last_offset) = self.0.last() {
if *last_offset > offset {
panic!("Offsets must be pushed in sorted order");
}
assert!(
*last_offset <= offset,
"Offsets must be pushed in sorted order"
);
}
self.0.push(offset);
}
Expand Down

0 comments on commit 2676a44

Please sign in to comment.