pdf-chrome-w7: Seen's default with Rect::NOTHING, since Rect has no Default (lead, compile)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Dylan M. Taylor
2026-11-18 03:55:15 -05:00
co-authored by Claude Opus 5.5
parent cf27faadf2
commit 2f0139bbc2
+7 -1
View File
@@ -69,13 +69,19 @@ fn drag_divider(fixture: &mut Fixture, index: u64, by: Vec2) {
}
/// What the tab-drop host reported since the last drag.
#[derive(Default)]
struct Seen {
drops: Vec<TabDrop<usize>>,
torn: usize,
views: Rect,
}
// `egui::Rect` has no `Default`; nothing is shown before the first frame.
impl Default for Seen {
fn default() -> Self {
Seen { drops: Vec::new(), torn: 0, views: Rect::NOTHING }
}
}
/// A document strip above split views in `layout` with `count` documents that take every drop but at `refused`.
fn tab_host(layout: SplitLayout, count: usize, refused: Option<TabDropTarget>, direction: Direction) -> (Fixture, Rc<RefCell<Seen>>) {
let seen = Rc::new(RefCell::new(Seen::default()));