tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 582HTML 275Markdown 8TOML 41545 Definitions

Fix typos (#164)

Co-authored-by: Marcello Vaz <marcello@pixodust.com>

3e3830fb0ac58ead08520251c0d5e3574f83f275 · by Marcello Vaz · (4 years ago) · parent b4ec9dc10 · browse the tree at this commit

Semantic delta

No definition changed: this change is text, documentation or data.

5 files · +14 −14

diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 5fcfe926e..55feca4d6 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -12,7 +12,7 @@ The release number or commit hash of the version you're using.
 
 ## Platform
 
-What platform are you using `taffy` on? e.g. Rust, Andriod, IOS, JavaScript/TypeScript
+What platform are you using `taffy` on? e.g. Rust, Android, IOS, JavaScript/TypeScript
 
 ## What you did
 
diff --git a/src/flexbox.rs b/src/flexbox.rs
index 1314996fa..a56526a92 100644
--- a/src/flexbox.rs
+++ b/src/flexbox.rs
@@ -486,11 +486,11 @@ impl Forest {
     ///     - Otherwise, starting from the first uncollected item, collect consecutive items one by one until the first time that the next collected item would not fit into the flex container’s inner main size
     ///         (or until a forced break is encountered, see [§10 Fragmenting Flex Layout](https://www.w3.org/TR/css-flexbox-1/#pagination)).
     ///         If the very first uncollected item wouldn’t fit, collect just it into the line.
-    ///         
+    ///
     ///         For this step, the size of a flex item is its outer hypothetical main size. (**Note: This can be negative**.)
     ///
     ///         Repeat until all flex items have been collected into flex lines.
-    ///         
+    ///
     ///         **Note that the "collect as many" line will collect zero-sized flex items onto the end of the previous line even if the last non-zero item exactly "filled up" the line**.
     #[inline]
     fn collect_flex_lines<'a>(
@@ -822,7 +822,7 @@ impl Forest {
         flex_lines: &mut [FlexLine],
         constants: &AlgoConstants,
     ) {
-        /// Recursively caluculates the baseline for children
+        /// Recursively calculates the baseline for children
         fn calc_baseline(db: &Forest, node: NodeId, layout: &Layout) -> f32 {
             if db.children[node].is_empty() {
                 layout.size.height
@@ -880,7 +880,7 @@ impl Forest {
     /// - [**Calculate the cross size of each flex line**](https://www.w3.org/TR/css-flexbox-1/#algo-cross-line).
     ///
     ///     If the flex container is single-line and has a definite cross size, the cross size of the flex line is the flex container’s inner cross size.
-    ///         
+    ///
     ///     Otherwise, for each flex line:
     ///
     ///     1. Collect all the flex items whose inline-axis is parallel to the main-axis, whose align-self is baseline, and whose cross-axis margins are both non-auto.
@@ -890,7 +890,7 @@ impl Forest {
     ///     2. Among all the items not collected by the previous step, find the largest outer hypothetical cross size.
     ///
     ///     3. The used cross-size of the flex line is the largest of the numbers found in the previous two steps and zero.
-    ///         
+    ///
     ///         If the flex container is single-line, then clamp the line’s cross-size to be within the container’s computed min and max cross sizes.
     ///         **Note that if CSS 2.1’s definition of min/max-width/height applied more generally, this behavior would fall out automatically**.
     #[inline]
@@ -1124,10 +1124,10 @@ impl Forest {
     ///
     /// - [**Resolve cross-axis `auto` margins**](https://www.w3.org/TR/css-flexbox-1/#algo-cross-margins).
     ///     If a flex item has auto cross-axis margins:
-    ///     
+    ///
     ///     - If its outer cross size (treating those auto margins as zero) is less than the cross size of its flex line,
     ///         distribute the difference in those sizes equally to the auto margins.
-    ///     
+    ///
     ///     - Otherwise, if the block-start or inline-start margin (whichever is in the cross axis) is auto, set it to zero.
     ///         Set the opposite margin so that the outer cross size of the item equals the cross size of its flex line.
     #[inline]
@@ -1243,7 +1243,7 @@ impl Forest {
     /// # [9.6. Cross-Axis Alignment](https://www.w3.org/TR/css-flexbox-1/#cross-alignment)
     ///
     /// - [**Determine the flex container’s used cross size**](https://www.w3.org/TR/css-flexbox-1/#algo-cross-container):
-    ///     
+    ///
     ///     - If the cross size property is a definite size, use that, clamped by the used min and max cross sizes of the flex container.
     ///
     ///     - Otherwise, use the sum of the flex lines' cross sizes, clamped by the used min and max cross sizes of the flex container.
diff --git a/src/forest.rs b/src/forest.rs
index 8f7b0d095..36b2926ab 100644
--- a/src/forest.rs
+++ b/src/forest.rs
@@ -1,6 +1,6 @@
 //! Forest - a struct-of-arrays data structure for storing node trees.
 //!
-//! Backing datastructure for `Taffy` structs.
+//! Backing data structure for `Taffy` structs.
 use crate::geometry::Size;
 use crate::layout::{Cache, Layout};
 use crate::node::{MeasureFunc, NodeId};
@@ -140,7 +140,7 @@ impl Forest {
             return None;
         }
 
-        // Remove old node as parent from all its chilren.
+        // Remove old node as parent from all its children.
         for child in &self.children[node] {
             let parents_child = &mut self.parents[*child];
             let mut pos = 0;
diff --git a/src/math.rs b/src/math.rs
index 2d99ab827..06920daa5 100644
--- a/src/math.rs
+++ b/src/math.rs
@@ -1,4 +1,4 @@
-//! Contains numberical helper traits and functions
+//! Contains numerical helper traits and functions
 
 /// A trait to conveniently calculate minimums and maximums when some data may not be defined
 ///
@@ -14,7 +14,7 @@ pub(crate) trait MaybeMath<In, Out> {
     /// Adds `self` and `rhs`.
     fn maybe_add(self, rhs: In) -> Out;
 
-    /// Subracts rhs from `self`, treating [`None`] values as default
+    /// Subtracts rhs from `self`, treating [`None`] values as default
     fn maybe_sub(self, rhs: In) -> Out;
 }
 
diff --git a/src/style.rs b/src/style.rs
index 22f5a03f7..82431f973 100644
--- a/src/style.rs
+++ b/src/style.rs
@@ -234,7 +234,7 @@ pub enum FlexWrap {
     NoWrap,
     /// Items will wrap according to this item's [`FlexDirection`]
     Wrap,
-    /// Items will wrap in the oppposite direction to this item's [`FlexDirection`]
+    /// Items will wrap in the opposite direction to this item's [`FlexDirection`]
     WrapReverse,
 }