From 1ab8fa2895bd2339981e0be52591f38ad834ed21 Mon Sep 17 00:00:00 2001 From: Rhea-Eve <132553576+Rhea-Eve@users.noreply.github.com> Date: Mon, 18 Mar 2024 04:33:15 -0400 Subject: [PATCH] rustdoc: Fix two warnings in `components/layout_2020` (#31712) * Fix BoxFragment reference. Signed-off-by: Rhea Karty * Fix reference to InlineFormattingContext. Signed-off-by: Rhea Karty * Rewrap lines to avoid long length * Remove trailing whitesapce --------- Signed-off-by: Rhea Karty Co-authored-by: Martin Robinson --- components/layout_2020/flow/line.rs | 3 ++- components/layout_2020/formatting_contexts.rs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/components/layout_2020/flow/line.rs b/components/layout_2020/flow/line.rs index 9661fe0d819c..390ed4abf999 100644 --- a/components/layout_2020/flow/line.rs +++ b/components/layout_2020/flow/line.rs @@ -32,7 +32,8 @@ use crate::style_ext::PaddingBorderMargin; use crate::ContainingBlock; pub(super) struct LineMetrics { - /// The block offset of the line start in the containing [`InlineFormattingContext`]. + /// The block offset of the line start in the containing + /// [`crate::flow::InlineFormattingContext`]. pub block_offset: Length, /// The block size of this line. diff --git a/components/layout_2020/formatting_contexts.rs b/components/layout_2020/formatting_contexts.rs index be481c5ece95..347e88ad96e2 100644 --- a/components/layout_2020/formatting_contexts.rs +++ b/components/layout_2020/formatting_contexts.rs @@ -59,8 +59,8 @@ pub(crate) enum NonReplacedFormattingContextContents { // Other layout modes go here } -/// The baselines of a layout or a [`BoxFragment`]. Some layout uses the first and some layout uses -/// the last. +/// The baselines of a layout or a [`crate::fragment_tree::BoxFragment`]. Some layout +/// uses the first and some layout uses the last. #[derive(Debug, Default, Serialize)] pub(crate) struct Baselines { pub first: Option,