Remove ExcerptProperties struct

Pass buffer and range as separate parameters

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld
2022-02-09 17:52:17 -08:00
co-authored by Nathan Sobo
parent b67be5ded3
commit aa7dfbdd9c
4 changed files with 54 additions and 191 deletions
+3 -5
View File
@@ -7,7 +7,7 @@ use editor::{
display_map::{BlockDisposition, BlockId, BlockProperties, RenderBlock},
highlight_diagnostic_message,
items::BufferItemHandle,
Autoscroll, BuildSettings, Editor, ExcerptId, ExcerptProperties, MultiBuffer, ToOffset,
Autoscroll, BuildSettings, Editor, ExcerptId, MultiBuffer, ToOffset,
};
use gpui::{
action, elements::*, fonts::TextStyle, keymap::Binding, AnyViewHandle, AppContext, Entity,
@@ -335,10 +335,8 @@ impl ProjectDiagnosticsEditor {
);
let excerpt_id = excerpts.insert_excerpt_after(
&prev_excerpt_id,
ExcerptProperties {
buffer: &buffer,
range: excerpt_start..excerpt_end,
},
buffer.clone(),
excerpt_start..excerpt_end,
excerpts_cx,
);