From 343c7124a455bf42f48a44a9160724a6d7f1672b Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Sun, 11 Jun 2023 20:58:29 +0200 Subject: [PATCH] fix some typos (#78) --- crates/compiler/src/common.rs | 2 +- crates/compiler/src/evaluate/bin_op.rs | 2 +- crates/compiler/src/selector/extend/extended_selector.rs | 2 +- crates/compiler/src/selector/extend/mod.rs | 2 +- crates/compiler/src/selector/simple.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/compiler/src/common.rs b/crates/compiler/src/common.rs index a81a401..71e1ba1 100644 --- a/crates/compiler/src/common.rs +++ b/crates/compiler/src/common.rs @@ -115,7 +115,7 @@ impl ListSeparator { /// In Sass, underscores and hyphens are considered equal when inside identifiers. /// -/// This struct protects that invariant by normalizing all underscores into hypens. +/// This struct protects that invariant by normalizing all underscores into hyphens. #[derive(Clone, Eq, PartialEq, Hash, PartialOrd, Ord, Copy)] pub struct Identifier(InternedString); diff --git a/crates/compiler/src/evaluate/bin_op.rs b/crates/compiler/src/evaluate/bin_op.rs index a504924..573d1ea 100644 --- a/crates/compiler/src/evaluate/bin_op.rs +++ b/crates/compiler/src/evaluate/bin_op.rs @@ -144,7 +144,7 @@ pub(crate) fn add(left: Value, right: Value, options: &Options, span: Span) -> S } }, c @ Value::Color(..) => match right { - // todo: we really cant add to any other types? + // todo: we really can't add to any other types? Value::String(..) | Value::Null | Value::List(..) => Value::String( format!( "{}{}", diff --git a/crates/compiler/src/selector/extend/extended_selector.rs b/crates/compiler/src/selector/extend/extended_selector.rs index 0c4189d..b14a514 100644 --- a/crates/compiler/src/selector/extend/extended_selector.rs +++ b/crates/compiler/src/selector/extend/extended_selector.rs @@ -62,7 +62,7 @@ impl ExtendedSelector { /// for this yet (we can't just use a `Vec` because linear insert) /// is too big of a penalty /// -/// In pratice, I have yet to find a test case that can demonstrate +/// In practice, I have yet to find a test case that can demonstrate /// an issue with storing a `RefCell`. #[derive(Clone, Debug)] pub(crate) struct SelectorHashSet(HashSet); diff --git a/crates/compiler/src/selector/extend/mod.rs b/crates/compiler/src/selector/extend/mod.rs index 38a5bac..673e1ad 100644 --- a/crates/compiler/src/selector/extend/mod.rs +++ b/crates/compiler/src/selector/extend/mod.rs @@ -1149,7 +1149,7 @@ impl ExtensionStore { */ - // If no extends actually happened (for example becaues unification + // If no extends actually happened (for example because unification // failed), we don't need to re-register the selector. let selector_as_selector = selector.clone().into_selector().0; if old_value == selector_as_selector { diff --git a/crates/compiler/src/selector/simple.rs b/crates/compiler/src/selector/simple.rs index df51b05..abe3658 100644 --- a/crates/compiler/src/selector/simple.rs +++ b/crates/compiler/src/selector/simple.rs @@ -190,7 +190,7 @@ impl SimpleSelector { } } - /// Returns the compoments of a `CompoundSelector` that matches only elements + /// Returns the components of a `CompoundSelector` that matches only elements /// matched by both this and `compound`. /// /// By default, this just returns a copy of `compound` with this selector