From 0a41844cc4e645e87fe48aa31ed3a4fd40a6ab11 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 7 Nov 2022 14:30:50 +0100 Subject: Selectors --- library/src/structure/heading.rs | 4 ++-- library/src/structure/list.rs | 6 +++--- library/src/structure/reference.rs | 2 +- library/src/structure/table.rs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'library/src/structure') diff --git a/library/src/structure/heading.rs b/library/src/structure/heading.rs index 46e98c18..f93be5d9 100644 --- a/library/src/structure/heading.rs +++ b/library/src/structure/heading.rs @@ -78,8 +78,8 @@ impl HeadingNode { } impl Show for HeadingNode { - fn unguard_parts(&self, sel: Selector) -> Content { - Self { body: self.body.unguard(sel), ..*self }.pack() + fn unguard_parts(&self, id: RecipeId) -> Content { + Self { body: self.body.unguard(id), ..*self }.pack() } fn show(&self, _: Tracked, _: StyleChain) -> SourceResult { diff --git a/library/src/structure/list.rs b/library/src/structure/list.rs index 499207a4..89dc0f35 100644 --- a/library/src/structure/list.rs +++ b/library/src/structure/list.rs @@ -94,9 +94,9 @@ impl ListNode { } impl Show for ListNode { - fn unguard_parts(&self, sel: Selector) -> Content { + fn unguard_parts(&self, id: RecipeId) -> Content { Self { - items: self.items.map(|item| item.unguard(sel)), + items: self.items.map(|item| item.unguard(id)), ..*self } .pack() @@ -208,7 +208,7 @@ impl ListItem { } } - fn unguard(&self, sel: Selector) -> Self { + fn unguard(&self, sel: RecipeId) -> Self { match self { Self::List(body) => Self::List(Box::new(body.unguard(sel))), Self::Enum(number, body) => Self::Enum(*number, Box::new(body.unguard(sel))), diff --git a/library/src/structure/reference.rs b/library/src/structure/reference.rs index 18f4eecb..7004f49e 100644 --- a/library/src/structure/reference.rs +++ b/library/src/structure/reference.rs @@ -20,7 +20,7 @@ impl RefNode { } impl Show for RefNode { - fn unguard_parts(&self, _: Selector) -> Content { + fn unguard_parts(&self, _: RecipeId) -> Content { Self(self.0.clone()).pack() } diff --git a/library/src/structure/table.rs b/library/src/structure/table.rs index fbf1c7c0..8c6191be 100644 --- a/library/src/structure/table.rs +++ b/library/src/structure/table.rs @@ -58,11 +58,11 @@ impl TableNode { } impl Show for TableNode { - fn unguard_parts(&self, sel: Selector) -> Content { + fn unguard_parts(&self, id: RecipeId) -> Content { Self { tracks: self.tracks.clone(), gutter: self.gutter.clone(), - cells: self.cells.iter().map(|cell| cell.unguard(sel)).collect(), + cells: self.cells.iter().map(|cell| cell.unguard(id)).collect(), } .pack() } -- cgit v1.2.3