From aea1d55f4982b45040b565ee4655a7e3b5a693bc Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Tue, 19 Sep 2023 08:48:37 +0800 Subject: [PATCH] Fix typos Found via `typos --format brief` --- crates/path/src/path.rs | 4 ++-- crates/tessellation/src/fill.rs | 14 +++++++------- crates/tessellation/src/lib.rs | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/crates/path/src/path.rs b/crates/path/src/path.rs index 3cc03e0a..660d1460 100644 --- a/crates/path/src/path.rs +++ b/crates/path/src/path.rs @@ -1474,7 +1474,7 @@ fn test_reverse_path_simple() { let mut it = p2.iter_with_attributes(); - // Using a function that explicits the argument types works around type inference issue. + // Using a function that explicit the argument types works around type inference issue. fn check<'l>( a: Option), Point>>, b: Option), Point>>, @@ -1553,7 +1553,7 @@ fn test_reverse_path_1() { let mut it = p1.reversed().with_attributes(); - // Using a function that explicits the argument types works around type inference issue. + // Using a function that explicit the argument types works around type inference issue. fn check<'l>( a: Option), Point>>, b: Option), Point>>, diff --git a/crates/tessellation/src/fill.rs b/crates/tessellation/src/fill.rs index b73408ab..2cff183f 100644 --- a/crates/tessellation/src/fill.rs +++ b/crates/tessellation/src/fill.rs @@ -11,7 +11,7 @@ use crate::path::{ use crate::{FillGeometryBuilder, Orientation, VertexId}; use crate::{ FillOptions, InternalError, SimpleAttributeStore, TessellationError, TessellationResult, - UnsupportedParamater, VertexSource, + UnsupportedParameter, VertexSource, }; use float_next_after::NextAfter; use std::cmp::Ordering; @@ -200,7 +200,7 @@ struct ActiveEdges { } struct Span { - /// We store `MonotoneTesselator` behind a `Box` for performance purposes. + /// We store `MonotoneTessellator` behind a `Box` for performance purposes. /// For more info, see [Issue #621](https://github.com/nical/lyon/pull/621). tess: Option>, } @@ -221,7 +221,7 @@ impl Span { struct Spans { spans: Vec, - /// We store `MonotoneTesselator` behind a `Box` for performance purposes. + /// We store `MonotoneTessellator` behind a `Box` for performance purposes. /// For more info, see [Issue #621](https://github.com/nical/lyon/pull/621). #[allow(clippy::vec_box)] pool: Vec>, @@ -751,8 +751,8 @@ impl FillTessellator { builder: &mut dyn FillGeometryBuilder, ) -> TessellationResult { if options.tolerance.is_nan() || options.tolerance <= 0.0 { - return Err(TessellationError::UnsupportedParamater( - UnsupportedParamater::ToleranceIsNaN, + return Err(TessellationError::UnsupportedParameter( + UnsupportedParameter::ToleranceIsNaN, )); } @@ -867,8 +867,8 @@ impl FillTessellator { self.current_position = self.events.position(current_event); if self.current_position.x.is_nan() || self.current_position.y.is_nan() { - return Err(TessellationError::UnsupportedParamater( - UnsupportedParamater::PositionIsNaN, + return Err(TessellationError::UnsupportedParameter( + UnsupportedParameter::PositionIsNaN, )); } diff --git a/crates/tessellation/src/lib.rs b/crates/tessellation/src/lib.rs index 067993e5..67ef246f 100644 --- a/crates/tessellation/src/lib.rs +++ b/crates/tessellation/src/lib.rs @@ -260,7 +260,7 @@ pub enum InternalError { pub enum TessellationError { // TODO Parameter typo #[error("Unsupported parameter: {0}")] - UnsupportedParamater(UnsupportedParamater), + UnsupportedParameter(UnsupportedParameter), #[error("Geometry builder error: {0}")] GeometryBuilder(#[from] GeometryBuilderError), #[error("Internal error: {0}")] @@ -268,7 +268,7 @@ pub enum TessellationError { } #[derive(Error, Clone, Debug, PartialEq)] -pub enum UnsupportedParamater { +pub enum UnsupportedParameter { #[error("Position is not a number")] PositionIsNaN, #[error("Tolerance threshold is not a number")]