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
parent 8aeab4800c
commit 84ce81caf1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 31 additions and 31 deletions

View file

@ -3339,7 +3339,7 @@ impl EntryKind {
impl sum_tree::Item for Entry {
type Summary = EntrySummary;
fn summary(&self) -> Self::Summary {
fn summary(&self, _cx: &()) -> Self::Summary {
let non_ignored_count = if self.is_ignored || self.is_external {
0
} else {
@ -3434,7 +3434,7 @@ struct PathEntry {
impl sum_tree::Item for PathEntry {
type Summary = PathEntrySummary;
fn summary(&self) -> Self::Summary {
fn summary(&self, _cx: &()) -> Self::Summary {
PathEntrySummary { max_id: self.id }
}
}