Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Remove spurious lifetimes
Julia525d84e5bf94
diff --git a/crates/text/src/text.rs b/crates/text/src/text.rsindex 7e486d231e8..0a260c08cee 100644--- a/crates/text/src/text.rs+++ b/crates/text/src/text.rs@@ -2361,20 +2361,20 @@ pub trait ToOffset {}impl ToOffset for Point {- fn to_offset<'a>(&self, snapshot: &BufferSnapshot) -> usize {+ fn to_offset(&self, snapshot: &BufferSnapshot) -> usize {snapshot.point_to_offset(*self)}}impl ToOffset for usize {- fn to_offset<'a>(&self, snapshot: &BufferSnapshot) -> usize {+ fn to_offset(&self, snapshot: &BufferSnapshot) -> usize {assert!(*self <= snapshot.len(), "offset {self} is out of range");*self}}impl ToOffset for Anchor {- fn to_offset<'a>(&self, snapshot: &BufferSnapshot) -> usize {+ fn to_offset(&self, snapshot: &BufferSnapshot) -> usize {snapshot.summary_for_anchor(self)}}@@ -2402,25 +2402,25 @@ pub trait ToPoint {}impl ToPoint for Anchor {- fn to_point<'a>(&self, snapshot: &BufferSnapshot) -> Point {+ fn to_point(&self, snapshot: &BufferSnapshot) -> Point {snapshot.summary_for_anchor(self)}}impl ToPoint for usize {- fn to_point<'a>(&self, snapshot: &BufferSnapshot) -> Point {+ fn to_point(&self, snapshot: &BufferSnapshot) -> Point {snapshot.offset_to_point(*self)}}impl ToPoint for Point {- fn to_point<'a>(&self, _: &BufferSnapshot) -> Point {+ fn to_point(&self, _: &BufferSnapshot) -> Point {*self}}impl ToPoint for Unclipped<PointUtf16> {- fn to_point<'a>(&self, snapshot: &BufferSnapshot) -> Point {+ fn to_point(&self, snapshot: &BufferSnapshot) -> Point {snapshot.unclipped_point_utf16_to_point(*self)}}@@ -2430,25 +2430,25 @@ pub trait ToPointUtf16 {}impl ToPointUtf16 for Anchor {- fn to_point_utf16<'a>(&self, snapshot: &BufferSnapshot) -> PointUtf16 {+ fn to_point_utf16(&self, snapshot: &BufferSnapshot) -> PointUtf16 {snapshot.summary_for_anchor(self)}}impl ToPointUtf16 for usize {- fn to_point_utf16<'a>(&self, snapshot: &BufferSnapshot) -> PointUtf16 {+ fn to_point_utf16(&self, snapshot: &BufferSnapshot) -> PointUtf16 {snapshot.offset_to_point_utf16(*self)}}impl ToPointUtf16 for PointUtf16 {- fn to_point_utf16<'a>(&self, _: &BufferSnapshot) -> PointUtf16 {+ fn to_point_utf16(&self, _: &BufferSnapshot) -> PointUtf16 {*self}}impl ToPointUtf16 for Point {- fn to_point_utf16<'a>(&self, snapshot: &BufferSnapshot) -> PointUtf16 {+ fn to_point_utf16(&self, snapshot: &BufferSnapshot) -> PointUtf16 {snapshot.point_to_point_utf16(*self)}}@@ -2458,19 +2458,19 @@ pub trait ToOffsetUtf16 {}impl ToOffsetUtf16 for Anchor {- fn to_offset_utf16<'a>(&self, snapshot: &BufferSnapshot) -> OffsetUtf16 {+ fn to_offset_utf16(&self, snapshot: &BufferSnapshot) -> OffsetUtf16 {snapshot.summary_for_anchor(self)}}impl ToOffsetUtf16 for usize {- fn to_offset_utf16<'a>(&self, snapshot: &BufferSnapshot) -> OffsetUtf16 {+ fn to_offset_utf16(&self, snapshot: &BufferSnapshot) -> OffsetUtf16 {snapshot.offset_to_offset_utf16(*self)}}impl ToOffsetUtf16 for OffsetUtf16 {- fn to_offset_utf16<'a>(&self, _snapshot: &BufferSnapshot) -> OffsetUtf16 {+ fn to_offset_utf16(&self, _snapshot: &BufferSnapshot) -> OffsetUtf16 {*self}}