diff options
author | Federico Mena Quintero <federico@gnome.org> | 2023-04-21 18:29:50 -0600 |
---|---|---|
committer | Federico Mena Quintero <federico@gnome.org> | 2023-04-21 18:29:50 -0600 |
commit | e33546a61609c8f3bfd89c35e9bf6916ae76782e (patch) | |
tree | 46ced32be2be25db1d8426310f660d6fb1572f5b | |
parent | 615f976f875bd246b6d3271641a1303c670828d6 (diff) | |
download | librsvg-e33546a61609c8f3bfd89c35e9bf6916ae76782e.tar.gz |
Fix warnings from "cargo doc"
A bunch of unquoted http links and XML element names, mostly.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/822>
-rw-r--r-- | rsvg/src/css.rs | 2 | ||||
-rw-r--r-- | rsvg/src/filter.rs | 4 | ||||
-rw-r--r-- | rsvg/src/filters/color_matrix.rs | 8 | ||||
-rw-r--r-- | rsvg/src/filters/context.rs | 2 | ||||
-rw-r--r-- | rsvg/src/filters/drop_shadow.rs | 2 | ||||
-rw-r--r-- | rsvg/src/gradient.rs | 22 | ||||
-rw-r--r-- | rsvg/src/layout.rs | 2 | ||||
-rw-r--r-- | rsvg/src/pattern.rs | 4 | ||||
-rw-r--r-- | rsvg/src/style.rs | 4 |
9 files changed, 25 insertions, 25 deletions
diff --git a/rsvg/src/css.rs b/rsvg/src/css.rs index bf81dddf..14d51bd6 100644 --- a/rsvg/src/css.rs +++ b/rsvg/src/css.rs @@ -681,7 +681,7 @@ impl selectors::Element for RsvgElement { } } - /// Returns whether the element is an HTML <slot> element. + /// Returns whether the element is an HTML `<slot>` element. fn is_html_slot_element(&self) -> bool { false } diff --git a/rsvg/src/filter.rs b/rsvg/src/filter.rs index 7347b331..2e591b1e 100644 --- a/rsvg/src/filter.rs +++ b/rsvg/src/filter.rs @@ -18,7 +18,7 @@ use crate::rect::Rect; use crate::session::Session; use crate::xml::Attributes; -/// The <filter> node. +/// The `<filter>` node. pub struct Filter { x: Length<Horizontal>, y: Length<Vertical>, @@ -28,7 +28,7 @@ pub struct Filter { primitive_units: CoordUnits, } -/// A <filter> element definition in user-space coordinates. +/// A `<filter>` element definition in user-space coordinates. pub struct UserSpaceFilter { pub rect: Rect, pub filter_units: CoordUnits, diff --git a/rsvg/src/filters/color_matrix.rs b/rsvg/src/filters/color_matrix.rs index 3701b541..88eb6f11 100644 --- a/rsvg/src/filters/color_matrix.rs +++ b/rsvg/src/filters/color_matrix.rs @@ -243,7 +243,7 @@ impl ColorMatrix { /// Compute a `type="hueRotate"` matrix. /// - /// https://drafts.fxtf.org/filter-effects/#element-attrdef-fecolormatrix-values + /// <https://drafts.fxtf.org/filter-effects/#element-attrdef-fecolormatrix-values> #[rustfmt::skip] pub fn hue_rotate_matrix(radians: f64) -> Matrix5<f64> { let (sin, cos) = radians.sin_cos(); @@ -276,7 +276,7 @@ impl ColorMatrix { /// Compute a `type="luminanceToAlpha"` matrix. /// - /// https://drafts.fxtf.org/filter-effects/#element-attrdef-fecolormatrix-values + /// <https://drafts.fxtf.org/filter-effects/#element-attrdef-fecolormatrix-values> #[rustfmt::skip] fn luminance_to_alpha_matrix() -> Matrix5<f64> { Matrix5::new( @@ -290,7 +290,7 @@ impl ColorMatrix { /// Compute a `type="saturate"` matrix. /// - /// https://drafts.fxtf.org/filter-effects/#element-attrdef-fecolormatrix-values + /// <https://drafts.fxtf.org/filter-effects/#element-attrdef-fecolormatrix-values> #[rustfmt::skip] fn saturate_matrix(s: f64) -> Matrix5<f64> { Matrix5::new( @@ -304,7 +304,7 @@ impl ColorMatrix { /// Default for `type="matrix"`. /// - /// https://drafts.fxtf.org/filter-effects/#element-attrdef-fecolormatrix-values + /// <https://drafts.fxtf.org/filter-effects/#element-attrdef-fecolormatrix-values> fn default_matrix() -> Matrix5<f64> { Matrix5::identity() } diff --git a/rsvg/src/filters/context.rs b/rsvg/src/filters/context.rs index a3b28d69..a09160ab 100644 --- a/rsvg/src/filters/context.rs +++ b/rsvg/src/filters/context.rs @@ -282,7 +282,7 @@ impl FilterContext { /// Get a filter primitive's default input as if its `in=\"...\"` were not specified. /// - /// Per https://drafts.fxtf.org/filter-effects/#element-attrdef-filter-primitive-in, + /// Per <https://drafts.fxtf.org/filter-effects/#element-attrdef-filter-primitive-in>, /// "References to non-existent results will be treated as if no result was /// specified". That is, fall back to the last result in the filter chain, or if this /// is the first in the chain, just use SourceGraphic. diff --git a/rsvg/src/filters/drop_shadow.rs b/rsvg/src/filters/drop_shadow.rs index 49abb574..a7003f10 100644 --- a/rsvg/src/filters/drop_shadow.rs +++ b/rsvg/src/filters/drop_shadow.rs @@ -28,7 +28,7 @@ pub struct DropShadow { } impl Default for DropShadow { - /// Defaults come from https://www.w3.org/TR/filter-effects/#feDropShadowElement + /// Defaults come from <https://www.w3.org/TR/filter-effects/#feDropShadowElement> fn default() -> Self { Self { in1: Default::default(), diff --git a/rsvg/src/gradient.rs b/rsvg/src/gradient.rs index 311343cb..e29d3fcd 100644 --- a/rsvg/src/gradient.rs +++ b/rsvg/src/gradient.rs @@ -21,13 +21,13 @@ use crate::transform::{Transform, TransformAttribute}; use crate::unit_interval::UnitInterval; use crate::xml::Attributes; -/// Contents of a <stop> element for gradient color stops +/// Contents of a `<stop>` element for gradient color stops #[derive(Copy, Clone)] pub struct ColorStop { - /// <stop offset="..."/> + /// `<stop offset="..."/>` pub offset: UnitInterval, - /// <stop stop-color="..." stop-opacity="..."/> + /// `<stop stop-color="..." stop-opacity="..."/>` pub rgba: cssparser::RGBA, } @@ -55,10 +55,10 @@ impl Parse for SpreadMethod { } } -/// Node for the <stop> element +/// Node for the `<stop>` element #[derive(Default)] pub struct Stop { - /// <stop offset="..."/> + /// `<stop offset="..."/>` offset: UnitInterval, /* stop-color and stop-opacity are not attributes; they are properties, so * they go into property_defs.rs */ @@ -76,7 +76,7 @@ impl ElementTrait for Stop { /// Parameters specific to each gradient type, before being resolved. /// These will be composed together with UnreseolvedVariant from fallback -/// nodes (referenced with e.g. <linearGradient xlink:href="#fallback">) to form +/// nodes (referenced with e.g. `<linearGradient xlink:href="#fallback">`) to form /// a final, resolved Variant. #[derive(Copy, Clone)] enum UnresolvedVariant { @@ -288,7 +288,7 @@ struct Common { fallback: Option<NodeId>, } -/// Node for the <linearGradient> element +/// Node for the `<linearGradient>` element #[derive(Default)] pub struct LinearGradient { common: Common, @@ -299,7 +299,7 @@ pub struct LinearGradient { y2: Option<Length<Vertical>>, } -/// Node for the <radialGradient> element +/// Node for the `<radialGradient>` element #[derive(Default)] pub struct RadialGradient { common: Common, @@ -313,8 +313,8 @@ pub struct RadialGradient { } /// Main structure used during gradient resolution. For unresolved -/// gradients, we store all fields as Option<T> - if None, it means -/// that the field is not specified; if Some(T), it means that the +/// gradients, we store all fields as `Option<T>` - if `None`, it means +/// that the field is not specified; if `Some(T)`, it means that the /// field was specified. struct UnresolvedGradient { units: Option<GradientUnits>, @@ -403,7 +403,7 @@ impl UnresolvedGradient { } } - /// Looks for <stop> children inside a linearGradient or radialGradient node, + /// Looks for `<stop>` children inside a linearGradient or radialGradient node, /// and adds their info to the UnresolvedGradient &self. fn add_color_stops_from_node(&mut self, node: &Node, opacity: UnitInterval) { assert!(matches!( diff --git a/rsvg/src/layout.rs b/rsvg/src/layout.rs index 434ae9a7..ca94d3e2 100644 --- a/rsvg/src/layout.rs +++ b/rsvg/src/layout.rs @@ -55,7 +55,7 @@ pub struct StackingContext { pub mix_blend_mode: MixBlendMode, pub isolation: Isolation, - /// Target from an <a> element + /// Target from an `<a>` element pub link_target: Option<String>, } diff --git a/rsvg/src/pattern.rs b/rsvg/src/pattern.rs index 8a10317f..2fbbcc16 100644 --- a/rsvg/src/pattern.rs +++ b/rsvg/src/pattern.rs @@ -74,8 +74,8 @@ enum Children { } /// Main structure used during pattern resolution. For unresolved -/// patterns, we store all fields as Option<T> - if None, it means -/// that the field is not specified; if Some(T), it means that the +/// patterns, we store all fields as `Option<T>` - if `None`, it means +/// that the field is not specified; if `Some(T)`, it means that the /// field was specified. struct UnresolvedPattern { common: Common, diff --git a/rsvg/src/style.rs b/rsvg/src/style.rs index 29e65d78..1afa2a00 100644 --- a/rsvg/src/style.rs +++ b/rsvg/src/style.rs @@ -7,7 +7,7 @@ use crate::error::*; use crate::session::Session; use crate::xml::Attributes; -/// Represents the syntax used in the <style> node. +/// Represents the syntax used in the `<style>` node. /// /// Currently only "text/css" is supported. /// @@ -38,7 +38,7 @@ impl StyleType { } } -/// Represents a <style> node. +/// Represents a `<style>` node. /// /// It does not render itself, and just holds CSS stylesheet information for the rest of /// the code to use. |