Pass Summary::Context to Item::summarize (#18510)

We are going to use this in the multi-buffer to produce a summary for an
`Excerpt` that contains a `Range<Anchor>`.

Release Notes:

- N/A

Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra
2024-09-29 10:30:48 -06:00
committed by GitHub
co-authored by Nathan
parent 8aeab4800c
commit 84ce81caf1
21 changed files with 31 additions and 31 deletions
+2 -2
View File
@@ -4596,7 +4596,7 @@ impl fmt::Debug for Excerpt {
impl sum_tree::Item for Excerpt {
type Summary = ExcerptSummary;
fn summary(&self) -> Self::Summary {
fn summary(&self, _cx: &()) -> Self::Summary {
let mut text = self.text_summary.clone();
if self.has_trailing_newline {
text += TextSummary::from("\n");
@@ -4613,7 +4613,7 @@ impl sum_tree::Item for Excerpt {
impl sum_tree::Item for ExcerptIdMapping {
type Summary = ExcerptId;
fn summary(&self) -> Self::Summary {
fn summary(&self, _cx: &()) -> Self::Summary {
self.id
}
}