summaryrefslogtreecommitdiff
path: root/crates/typst-library/src/layout/align.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-library/src/layout/align.rs')
-rw-r--r--crates/typst-library/src/layout/align.rs16
1 files changed, 4 insertions, 12 deletions
diff --git a/crates/typst-library/src/layout/align.rs b/crates/typst-library/src/layout/align.rs
index e5ceddf6..447648f0 100644
--- a/crates/typst-library/src/layout/align.rs
+++ b/crates/typst-library/src/layout/align.rs
@@ -2,11 +2,10 @@ use std::ops::Add;
use ecow::{eco_format, EcoString};
-use crate::diag::{bail, HintedStrResult, SourceResult, StrResult};
-use crate::engine::Engine;
+use crate::diag::{bail, HintedStrResult, StrResult};
use crate::foundations::{
- cast, elem, func, scope, ty, CastInfo, Content, Fold, FromValue, IntoValue, Packed,
- Reflect, Repr, Resolve, Show, StyleChain, Value,
+ cast, elem, func, scope, ty, CastInfo, Content, Fold, FromValue, IntoValue, Reflect,
+ Repr, Resolve, StyleChain, Value,
};
use crate::layout::{Abs, Axes, Axis, Dir, Side};
use crate::text::TextElem;
@@ -73,7 +72,7 @@ use crate::text::TextElem;
/// ```example
/// Start #h(1fr) End
/// ```
-#[elem(Show)]
+#[elem]
pub struct AlignElem {
/// The [alignment] along both axes.
///
@@ -97,13 +96,6 @@ pub struct AlignElem {
pub body: Content,
}
-impl Show for Packed<AlignElem> {
- #[typst_macros::time(name = "align", span = self.span())]
- fn show(&self, _: &mut Engine, styles: StyleChain) -> SourceResult<Content> {
- Ok(self.body.clone().aligned(self.alignment.get(styles)))
- }
-}
-
/// Where to align something along an axis.
///
/// Possible values are: