Fix typo in Excerpt::contains (#36621)

Follow-up to #36524 

Release Notes:

- N/A
This commit is contained in:
Cole Miller
2025-08-20 19:30:11 +00:00
committed by GitHub
parent b0bef3a9a2
commit 739e4551da
+13 -14
View File
@@ -6998,20 +6998,19 @@ impl Excerpt {
}
fn contains(&self, anchor: &Anchor) -> bool {
anchor.buffer_id == None
|| anchor.buffer_id == Some(self.buffer_id)
&& self
.range
.context
.start
.cmp(&anchor.text_anchor, &self.buffer)
.is_le()
&& self
.range
.context
.end
.cmp(&anchor.text_anchor, &self.buffer)
.is_ge()
(anchor.buffer_id == None || anchor.buffer_id == Some(self.buffer_id))
&& self
.range
.context
.start
.cmp(&anchor.text_anchor, &self.buffer)
.is_le()
&& self
.range
.context
.end
.cmp(&anchor.text_anchor, &self.buffer)
.is_ge()
}
/// The [`Excerpt`]'s start offset in its [`Buffer`]