mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
Formatting fixes
This commit is contained in:
parent
6f7e8dd497
commit
815ee3254c
@ -70,13 +70,13 @@ impl HNode {
|
|||||||
|
|
||||||
impl HNode {
|
impl HNode {
|
||||||
/// Normal strong spacing.
|
/// Normal strong spacing.
|
||||||
pub fn strong(amount: Spacing) -> Self {
|
pub fn strong(amount: impl Into<Spacing>) -> Self {
|
||||||
Self { amount, weak: false }
|
Self { amount: amount.into(), weak: false }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// User-created weak spacing.
|
/// User-created weak spacing.
|
||||||
pub fn weak(amount: Spacing) -> Self {
|
pub fn weak(amount: impl Into<Spacing>) -> Self {
|
||||||
Self { amount, weak: true }
|
Self { amount: amount.into(), weak: true }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ impl Align {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the position of this alignment in a container with the given
|
/// Returns the position of this alignment in a container with the given
|
||||||
/// extentq.
|
/// extent.
|
||||||
pub fn position(self, extent: Abs) -> Abs {
|
pub fn position(self, extent: Abs) -> Abs {
|
||||||
match self {
|
match self {
|
||||||
Self::Left | Self::Top => Abs::zero(),
|
Self::Left | Self::Top => Abs::zero(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user