termwiz: remove assertions
I don't think these are really necessary any more; the implementation cannot go out of bounds, so the worst that can happen is that we don't return any changes. refs: https://github.com/wez/wezterm/issues/2222
This commit is contained in:
1 parent
1bb9a3fe81
commit
62ca174d19
1 file changed
-8
@@ -751,9 +751,6 @@ impl Surface {
|
||||
///
|
||||
/// The returned list of `Change`s can be passed to the `add_changes` method
|
||||
/// to make the region within self match the region within other.
|
||||
/// # Panics
|
||||
/// Will panic if the regions of interest are not within the bounds of
|
||||
/// their respective `Surface`.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn diff_region(
|
||||
&self,
|
||||
@@ -765,11 +762,6 @@ impl Surface {
|
||||
other_x: usize,
|
||||
other_y: usize,
|
||||
) -> Vec<Change> {
|
||||
assert!(x + width <= self.width);
|
||||
assert!(y + height <= self.height);
|
||||
assert!(other_x + width <= other.width);
|
||||
assert!(other_y + height <= other.height);
|
||||
|
||||
let mut diff_state = DiffState::default();
|
||||
|
||||
for ((row_num, line), other_line) in self
|
||||
|
||||
Reference in new issue
Block a user