diff options
| author | +merlan #flirora <flirora@flirora.xyz> | 2025-06-25 12:58:40 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-25 16:58:40 +0000 |
| commit | d54544297beba0a762bee9bc731baab96e4d7250 (patch) | |
| tree | 78801fe0df0fe0d0daae2501c0bcfd8661bd30ba /crates/typst-layout | |
| parent | f2f527c451b1b05b393af99b89c528aadb203ce6 (diff) | |
Minor fixes to doc comments (#6500)
Diffstat (limited to 'crates/typst-layout')
| -rw-r--r-- | crates/typst-layout/src/inline/line.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/typst-layout/src/inline/line.rs b/crates/typst-layout/src/inline/line.rs index 659d33f4..f0518927 100644 --- a/crates/typst-layout/src/inline/line.rs +++ b/crates/typst-layout/src/inline/line.rs @@ -640,7 +640,7 @@ impl<'a> Items<'a> { self.0.push(entry.into()); } - /// Iterate over the items + /// Iterate over the items. pub fn iter(&self) -> impl Iterator<Item = &Item<'a>> { self.0.iter().map(|item| &**item) } @@ -698,6 +698,10 @@ impl Debug for Items<'_> { } /// A reference to or a boxed item. +/// +/// This is conceptually similar to a [`Cow<'a, Item<'a>>`][std::borrow::Cow], +/// but we box owned items since an [`Item`] is much bigger than +/// a box. pub enum ItemEntry<'a> { Ref(&'a Item<'a>), Box(Box<Item<'a>>), |
