From e6f7cc126c8c51dcaae7836775be97dd7a692b13 Mon Sep 17 00:00:00 2001 From: A-Walrus <58790821+A-Walrus@users.noreply.github.com> Date: Sat, 16 Mar 2024 11:25:40 +0200 Subject: [PATCH] Fix all cargo doc warnings (#3684) --- crates/typst-render/src/lib.rs | 2 +- crates/typst/src/layout/inline/mod.rs | 2 +- crates/typst/src/math/root.rs | 2 +- crates/typst/src/visualize/color.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/typst-render/src/lib.rs b/crates/typst-render/src/lib.rs index 5d116e495..e9dd3fbf0 100644 --- a/crates/typst-render/src/lib.rs +++ b/crates/typst-render/src/lib.rs @@ -1080,7 +1080,7 @@ impl OutlineBuilder for WrappedPathBuilder { } } -/// Additional methods for [`Length`]. +/// Additional methods for [`Abs`]. trait AbsExt { /// Convert to a number of points as f32. fn to_f32(self) -> f32; diff --git a/crates/typst/src/layout/inline/mod.rs b/crates/typst/src/layout/inline/mod.rs index 16da1539f..a574cd09f 100644 --- a/crates/typst/src/layout/inline/mod.rs +++ b/crates/typst/src/layout/inline/mod.rs @@ -1415,7 +1415,7 @@ fn reorder<'a>(line: &'a Line<'a>) -> (Vec<&Item<'a>>, bool) { /// How much a character should hang into the end margin. /// /// For more discussion, see: -/// https://recoveringphysicist.com/21/ +/// fn overhang(c: char) -> f64 { match c { // Dashes. diff --git a/crates/typst/src/math/root.rs b/crates/typst/src/math/root.rs index 90d3111b2..6a7604452 100644 --- a/crates/typst/src/math/root.rs +++ b/crates/typst/src/math/root.rs @@ -50,7 +50,7 @@ impl LayoutMath for Packed { /// Layout a root. /// /// TeXbook page 443, page 360 -/// See also: https://www.w3.org/TR/mathml-core/#radicals-msqrt-mroot +/// See also: fn layout( ctx: &mut MathContext, styles: StyleChain, diff --git a/crates/typst/src/visualize/color.rs b/crates/typst/src/visualize/color.rs index 365a06955..309619deb 100644 --- a/crates/typst/src/visualize/color.rs +++ b/crates/typst/src/visualize/color.rs @@ -32,7 +32,7 @@ pub type Luma = palette::luma::Lumaa; /// This is a minimal CMYK profile that only contains the necessary information /// to convert from CMYK to RGB. It is based on the CGATS TR 001-1995 /// specification. See -/// https://github.com/saucecontrol/Compact-ICC-Profiles#cmyk. +/// . static CMYK_TO_XYZ: Lazy> = Lazy::new(|| Profile::new_from_slice(typst_assets::icc::CMYK_TO_XYZ, false).unwrap());