diff --git a/src/buffer/buffer.rs b/src/buffer/buffer.rs index 9262b51d0..6204b8459 100644 --- a/src/buffer/buffer.rs +++ b/src/buffer/buffer.rs @@ -96,12 +96,14 @@ impl Buffer { } /// Returns a reference to Cell at the given coordinates + #[track_caller] pub fn get(&self, x: u16, y: u16) -> &Cell { let i = self.index_of(x, y); &self.content[i] } /// Returns a mutable reference to Cell at the given coordinates + #[track_caller] pub fn get_mut(&mut self, x: u16, y: u16) -> &mut Cell { let i = self.index_of(x, y); &mut self.content[i] @@ -133,6 +135,7 @@ impl Buffer { /// // starts at (200, 100). /// buffer.index_of(0, 0); // Panics /// ``` + #[track_caller] pub fn index_of(&self, x: u16, y: u16) -> usize { debug_assert!( x >= self.area.left()