From: Ben Pfaff Date: Fri, 11 Jul 2025 23:53:49 +0000 (-0700) Subject: rust: Fix `cargo doc` warnings. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=956ae86c5f901f17c1fe7bad28116e52c98699d6;p=pspp rust: Fix `cargo doc` warnings. --- diff --git a/rust/pspp/src/format/display/mod.rs b/rust/pspp/src/format/display/mod.rs index 4b5e2fbb4c..92e628998f 100644 --- a/rust/pspp/src/format/display/mod.rs +++ b/rust/pspp/src/format/display/mod.rs @@ -674,7 +674,7 @@ impl<'a, 'b> DisplayDatum<'a, 'b> { /// [Type::PIB], and so on) as binary values, and writes other output /// formats in the given `encoding`. /// - /// If `dv` is a [DisplayValue], the difference between `write!(f, "{}", + /// If `dv` is a [DisplayDatum], the difference between `write!(f, "{}", /// dv)` and `dv.write(f, encoding)` is: /// /// * `write!` always outputs UTF-8. Binary formats are encoded as the diff --git a/rust/pspp/src/lex/token.rs b/rust/pspp/src/lex/token.rs index 3eb1f99df6..66547c83e2 100644 --- a/rust/pspp/src/lex/token.rs +++ b/rust/pspp/src/lex/token.rs @@ -257,7 +257,7 @@ pub enum Punct { /// `?` (only appears in macros). Question, - /// ```` (only appears in macros). + /// ` (only appears in macros). Backtick, /// `.`. diff --git a/rust/pspp/src/output/cairo/fsm.rs b/rust/pspp/src/output/cairo/fsm.rs index 2c36967412..ccf4d21f1c 100644 --- a/rust/pspp/src/output/cairo/fsm.rs +++ b/rust/pspp/src/output/cairo/fsm.rs @@ -67,8 +67,8 @@ pub struct CairoFsmStyle { /// Resolution, in units per inch, used for measuring font "points": /// /// - 72.0 if 1 pt is one device unit, e.g. for rendering to a surface - /// created by [PsSurface::new] with its default transformation matrix of 72 - /// units/inch.p + /// created by [cairo::PsSurface::new] with its default transformation + /// matrix of 72 units/inch.p /// /// - 96.0 is traditional for a screen-based surface. pub font_resolution: f64, diff --git a/rust/pspp/src/output/pivot/mod.rs b/rust/pspp/src/output/pivot/mod.rs index 70f83b28d4..6c34441add 100644 --- a/rust/pspp/src/output/pivot/mod.rs +++ b/rust/pspp/src/output/pivot/mod.rs @@ -643,9 +643,9 @@ impl From<&str> for Category { /// Styling for a pivot table. /// -/// The division between this and the style information in [Table] seems fairly -/// arbitrary. The ultimate reason for the division is simply because that's -/// how SPSS documentation and file formats do it. +/// The division between this and the style information in [PivotTable] seems +/// fairly arbitrary. The ultimate reason for the division is simply because +/// that's how SPSS documentation and file formats do it. #[derive(Clone, Debug)] pub struct Look { pub name: Option, @@ -1766,8 +1766,8 @@ impl Display for Display26Adic { /// category while creating the category. See pivot_dimension_create() for /// more details. /// -/// [F]: crate::format::Format::F -/// [Pct]: crate::format::Format::Pct +/// [F]: crate::format::Type::F +/// [Pct]: crate::format::Type::Pct /// /// 2. A numeric or string value obtained from data ([ValueInner::Number] or /// [ValueInner::String]). If such a value corresponds to a variable, then the diff --git a/rust/pspp/src/output/render.rs b/rust/pspp/src/output/render.rs index 4a9bd56996..075a1fa69f 100644 --- a/rust/pspp/src/output/render.rs +++ b/rust/pspp/src/output/render.rs @@ -79,10 +79,10 @@ pub struct Params { /// on-screen display). pub printing: bool, - /// Whether [RenderOps::adjust_break] is implemented. + /// Whether [Device::adjust_break] is implemented. pub can_adjust_break: bool, - /// Whether [RenderOps::scale] is implemented. + /// Whether [Device::scale] is implemented. pub can_scale: bool, } @@ -123,8 +123,8 @@ pub trait Device { /// return value would be just sufficiently less that the breakpoint would /// be between lines of text. /// - /// Optional. If [RenderParams::can_adjust_break] is false, the rendering - /// engine assumes that all breakpoints are acceptable. + /// Optional. If [Params::can_adjust_break] is false, the rendering engine + /// assumes that all breakpoints are acceptable. fn adjust_break(&self, cell: &Content, size: Coord2) -> usize; /// Draws a generalized intersection of lines in `bb`. @@ -162,8 +162,8 @@ pub trait Device { /// everything subsequent to be drawn half-size. `factor` will be greater /// than 0 and less than or equal to 1. /// - /// Optional. If [RenderParams::can_scale] is false, the rendering engine - /// won't try to scale output. + /// Optional. If [Params::can_scale] is false, the rendering engine won't + /// try to scale output. fn scale(&mut self, factor: f64); }