summaryrefslogtreecommitdiff
path: root/library/src/meta
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-04-17 13:25:31 +0200
committerLaurenz <laurmaedje@gmail.com>2023-04-17 13:26:49 +0200
commit9bdc4a7de0fb685fa2b8d02280e70aa0b5d92bf9 (patch)
treee67c75c32183e734272943107ad2d034b1e8e818 /library/src/meta
parent428c55b6eed3536bb228924c6fb0ad6cea6d6d4b (diff)
Write PDF outline
Diffstat (limited to 'library/src/meta')
-rw-r--r--library/src/meta/figure.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/library/src/meta/figure.rs b/library/src/meta/figure.rs
index 42b32c9d..1f1499fc 100644
--- a/library/src/meta/figure.rs
+++ b/library/src/meta/figure.rs
@@ -173,14 +173,14 @@ impl Synthesize for FigureElem {
// Determine the figure's kind.
let kind = match self.kind(styles) {
Smart::Auto => self
- .find_figurable(vt, styles)
+ .find_figurable(styles)
.map(|elem| FigureKind::Elem(elem.func()))
.unwrap_or_else(|| FigureKind::Elem(ImageElem::func())),
Smart::Custom(kind) => kind,
};
let content = match &kind {
- FigureKind::Elem(func) => self.find_of_elem(vt, *func),
+ FigureKind::Elem(func) => self.find_of_elem(*func),
FigureKind::Name(_) => None,
}
.unwrap_or_else(|| self.body());
@@ -303,9 +303,9 @@ impl Refable for FigureElem {
impl FigureElem {
/// Determines the type of the figure by looking at the content, finding all
/// [`Figurable`] elements and sorting them by priority then returning the highest.
- pub fn find_figurable(&self, vt: &Vt, styles: StyleChain) -> Option<Content> {
+ pub fn find_figurable(&self, styles: StyleChain) -> Option<Content> {
self.body()
- .query(vt.introspector, Selector::can::<dyn Figurable>())
+ .query(Selector::can::<dyn Figurable>())
.into_iter()
.max_by_key(|elem| elem.with::<dyn Figurable>().unwrap().priority(styles))
.cloned()
@@ -313,9 +313,9 @@ impl FigureElem {
/// Finds the element with the given function in the figure's content.
/// Returns `None` if no element with the given function is found.
- pub fn find_of_elem(&self, vt: &Vt, func: ElemFunc) -> Option<Content> {
+ pub fn find_of_elem(&self, func: ElemFunc) -> Option<Content> {
self.body()
- .query(vt.introspector, Selector::Elem(func, None))
+ .query(Selector::Elem(func, None))
.into_iter()
.next()
.cloned()