refactor: rename leading to a more appropriate name

This commit is contained in:
Tobias Schmitz 2025-05-06 10:54:49 +02:00
parent 112ae858ea
commit 11c2049ddb
No known key found for this signature in database
3 changed files with 9 additions and 11 deletions

View File

@ -259,12 +259,11 @@ impl Show for Packed<EnumElem> {
.spanned(self.span());
if tight {
let leading = self
let spacing = self
.spacing(styles)
.unwrap_or_else(|| ParElem::leading_in(styles).into());
let spacing =
VElem::new(leading.into()).with_weak(true).with_attach(true).pack();
realized = spacing + realized;
let v = VElem::new(spacing.into()).with_weak(true).with_attach(true).pack();
realized = v + realized;
}
Ok(realized)

View File

@ -166,12 +166,11 @@ impl Show for Packed<ListElem> {
.spanned(self.span());
if tight {
let leading = self
let spacing = self
.spacing(styles)
.unwrap_or_else(|| ParElem::leading_in(styles).into());
let spacing =
VElem::new(leading.into()).with_weak(true).with_attach(true).pack();
realized = spacing + realized;
let v = VElem::new(spacing.into()).with_weak(true).with_attach(true).pack();
realized = v + realized;
}
Ok(realized)

View File

@ -189,15 +189,15 @@ impl Show for Packed<TermsElem> {
.styled(TermsElem::set_within(true));
if tight {
let leading = self
let spacing = self
.spacing(styles)
.unwrap_or_else(|| ParElem::leading_in(styles).into());
let spacing = VElem::new(leading.into())
let v = VElem::new(spacing.into())
.with_weak(true)
.with_attach(true)
.pack()
.spanned(span);
realized = spacing + realized;
realized = v + realized;
}
Ok(realized)