Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Track caller on `<usize as ToOffset>::to_offset` (#24503)
João Marcos0294b1969401
diff --git a/crates/gpui/src/arena.rs b/crates/gpui/src/arena.rsindex 4ddeaaff65e..0e78feca7bf 100644--- a/crates/gpui/src/arena.rs+++ b/crates/gpui/src/arena.rs@@ -116,6 +116,7 @@ impl<T: ?Sized> ArenaBox<T> {}}+ #[track_caller]fn validate(&self) {assert!(self.valid.get(),diff --git a/crates/multi_buffer/src/multi_buffer.rs b/crates/multi_buffer/src/multi_buffer.rsindex 9c80fcedd3e..0e8359412a8 100644--- a/crates/multi_buffer/src/multi_buffer.rs+++ b/crates/multi_buffer/src/multi_buffer.rs@@ -7320,6 +7320,7 @@ impl ToOffset for Point {}impl ToOffset for usize {+ #[track_caller]fn to_offset<'a>(&self, snapshot: &MultiBufferSnapshot) -> usize {assert!(*self <= snapshot.len(), "offset is out of range");*self