diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-07-09 10:16:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-09 08:16:36 +0000 |
| commit | e5e1dcd9c01341d2cd3473ac94a70223d5966086 (patch) | |
| tree | d648efad9463cb10270d55ba35210eeb1e91ee22 /crates/typst-library/src/layout/repeat.rs | |
| parent | 0a3c6939dd274f40672484695d909c2cc0d0d755 (diff) | |
Target-specific native show rules (#6569)
Diffstat (limited to 'crates/typst-library/src/layout/repeat.rs')
| -rw-r--r-- | crates/typst-library/src/layout/repeat.rs | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/crates/typst-library/src/layout/repeat.rs b/crates/typst-library/src/layout/repeat.rs index 9579f185..a38d5f89 100644 --- a/crates/typst-library/src/layout/repeat.rs +++ b/crates/typst-library/src/layout/repeat.rs @@ -1,7 +1,5 @@ -use crate::diag::SourceResult; -use crate::engine::Engine; -use crate::foundations::{elem, Content, NativeElement, Packed, Show, StyleChain}; -use crate::layout::{BlockElem, Length}; +use crate::foundations::{elem, Content}; +use crate::layout::Length; /// Repeats content to the available space. /// @@ -24,7 +22,7 @@ use crate::layout::{BlockElem, Length}; /// Berlin, the 22nd of December, 2022 /// ] /// ``` -#[elem(Show)] +#[elem] pub struct RepeatElem { /// The content to repeat. #[required] @@ -39,11 +37,3 @@ pub struct RepeatElem { #[default(true)] pub justify: bool, } - -impl Show for Packed<RepeatElem> { - fn show(&self, engine: &mut Engine, _: StyleChain) -> SourceResult<Content> { - Ok(BlockElem::single_layouter(self.clone(), engine.routines.layout_repeat) - .pack() - .spanned(self.span())) - } -} |
