From 3903867f82a2d9eea08b4b1cc57bd445523d59c4 Mon Sep 17 00:00:00 2001 From: Eric Roman Date: Fri, 16 May 2025 23:49:57 -0700 Subject: [PATCH] Fix spelling typos. (#3965) --- const_str_slice_concat/src/lib.rs | 6 +++--- examples/fetch/src/main.rs | 2 +- examples/suspense_tests/src/instrumented.rs | 2 +- integrations/axum/src/lib.rs | 8 ++++---- leptos/src/children.rs | 2 +- leptos/src/form.rs | 2 +- leptos/src/portal.rs | 2 +- leptos_server/src/local_resource.rs | 4 ++-- .../src/computed/async_derived/async_derived.rs | 2 +- reactive_graph/src/computed/inner.rs | 4 ++-- reactive_graph/src/computed/memo.rs | 2 +- reactive_graph/src/owner.rs | 4 ++-- reactive_graph/src/send_wrapper_ext.rs | 2 +- reactive_graph/src/signal/mapped.rs | 4 ++-- reactive_graph/src/traits.rs | 2 +- reactive_stores/README.md | 2 +- reactive_stores/src/option.rs | 2 +- router/src/link.rs | 4 ++-- server_fn/tests/server_macro.rs | 2 +- tachys/src/html/attribute/custom.rs | 2 +- tachys/src/view/mod.rs | 2 +- 21 files changed, 31 insertions(+), 31 deletions(-) diff --git a/const_str_slice_concat/src/lib.rs b/const_str_slice_concat/src/lib.rs index 1197d6a8f..8a0e5f0fe 100644 --- a/const_str_slice_concat/src/lib.rs +++ b/const_str_slice_concat/src/lib.rs @@ -31,7 +31,7 @@ pub const fn const_concat( let mut i = 0; // have it iterate over bytes manually, because, again, - // no mutable refernces in const fns + // no mutable references in const fns while i < x.len() { buffer[position] = x[i]; position += 1; @@ -59,7 +59,7 @@ pub const fn const_concat_with_prefix( let mut i = 0; // have it iterate over bytes manually, because, again, - // no mutable refernces in const fns + // no mutable references in const fns while i < x.len() { buffer[position] = x[i]; position += 1; @@ -116,7 +116,7 @@ pub const fn const_concat_with_separator( let mut i = 0; // have it iterate over bytes manually, because, again, - // no mutable refernces in const fns + // no mutable references in const fns while i < x.len() { buffer[position] = x[i]; position += 1; diff --git a/examples/fetch/src/main.rs b/examples/fetch/src/main.rs index 9faac968f..5a7ca77ea 100644 --- a/examples/fetch/src/main.rs +++ b/examples/fetch/src/main.rs @@ -7,7 +7,7 @@ pub fn main() { fmt() .with_writer( - // To avoide trace events in the browser from showing their + // To avoid trace events in the browser from showing their // JS backtrace, which is very annoying, in my opinion MakeConsoleWriter::default() .map_trace_level_to(tracing::Level::DEBUG), diff --git a/examples/suspense_tests/src/instrumented.rs b/examples/suspense_tests/src/instrumented.rs index 36aaf90d8..f4c780284 100644 --- a/examples/suspense_tests/src/instrumented.rs +++ b/examples/suspense_tests/src/instrumented.rs @@ -561,7 +561,7 @@ fn ShowCounters() -> impl IntoView { // // However, upon `Reset Counters`, the mode from which the reset // was issued will result in the rendering be reflected as such, so - // if the intial state was SSR, resetting under CSR will result in + // if the initial state was SSR, resetting under CSR will result in // the CSR counters be rendered after. However for the intents and // purpose for the testing only the CSR is cared for. // diff --git a/integrations/axum/src/lib.rs b/integrations/axum/src/lib.rs index 46305ae2d..c6107cd54 100644 --- a/integrations/axum/src/lib.rs +++ b/integrations/axum/src/lib.rs @@ -590,7 +590,7 @@ where /// Returns an Axum [Handler](axum::handler::Handler) that listens for a `GET` request and tries /// to route it using [leptos_router], serving an HTML stream of your application. /// -/// This version allows us to pass Axum State/Extension/Extractor or other infro from Axum or network +/// This version allows us to pass Axum State/Extension/Extractor or other info from Axum or network /// layers above Leptos itself. To use it, you'll need to write your own handler function that provides /// the data to leptos in a closure. An example is below /// ``` @@ -796,7 +796,7 @@ where /// This stream will pause at each `` node and wait for it to resolve before /// sending down its HTML. The app will become interactive once it has fully loaded. /// -/// This version allows us to pass Axum State/Extension/Extractor or other infro from Axum or network +/// This version allows us to pass Axum State/Extension/Extractor or other info from Axum or network /// layers above Leptos itself. To use it, you'll need to write your own handler function that provides /// the data to leptos in a closure. An example is below /// ``` @@ -1022,7 +1022,7 @@ where /// to route it using [leptos_router], asynchronously rendering an HTML page after all /// `async` resources have loaded. /// -/// This version allows us to pass Axum State/Extension/Extractor or other infro from Axum or network +/// This version allows us to pass Axum State/Extension/Extractor or other info from Axum or network /// layers above Leptos itself. To use it, you'll need to write your own handler function that provides /// the data to leptos in a closure. An example is below /// ``` @@ -1089,7 +1089,7 @@ where /// to route it using [leptos_router], asynchronously rendering an HTML page after all /// `async` resources have loaded. /// -/// This version allows us to pass Axum State/Extension/Extractor or other infro from Axum or network +/// This version allows us to pass Axum State/Extension/Extractor or other info from Axum or network /// layers above Leptos itself. To use it, you'll need to write your own handler function that provides /// the data to leptos in a closure. An example is below /// ``` diff --git a/leptos/src/children.rs b/leptos/src/children.rs index 929faf6bb..d3e788086 100644 --- a/leptos/src/children.rs +++ b/leptos/src/children.rs @@ -47,7 +47,7 @@ type BoxedChildrenFn = Box AnyView + Send>; /// /// Different component types take different types for their `children` prop, some of which cannot /// be directly constructed. Using `ToChildren` allows the component user to pass children without -/// explicity constructing the correct type. +/// explicitly constructing the correct type. /// /// ## Examples /// diff --git a/leptos/src/form.rs b/leptos/src/form.rs index dc0d3d526..529b3f902 100644 --- a/leptos/src/form.rs +++ b/leptos/src/form.rs @@ -255,7 +255,7 @@ where ) -> Result; } -/// Errors that can arise when coverting from an HTML event or form into a Rust data type. +/// Errors that can arise when converting from an HTML event or form into a Rust data type. #[derive(Error, Debug)] pub enum FromFormDataError { /// Could not find a `
` connected to the event. diff --git a/leptos/src/portal.rs b/leptos/src/portal.rs index f71c6ead7..c800d9d9e 100644 --- a/leptos/src/portal.rs +++ b/leptos/src/portal.rs @@ -8,7 +8,7 @@ use std::sync::Arc; /// /// Useful for inserting modals and tooltips outside of a cropping layout. /// If no mount point is given, the portal is inserted in `document.body`; -/// it is wrapped in a `
` unless `is_svg` is `true` in which case it's wrappend in a ``. +/// it is wrapped in a `
` unless `is_svg` is `true` in which case it's wrapped in a ``. /// Setting `use_shadow` to `true` places the element in a shadow root to isolate styles. #[cfg_attr(feature = "tracing", tracing::instrument(level = "trace", skip_all))] #[component] diff --git a/leptos_server/src/local_resource.rs b/leptos_server/src/local_resource.rs index 4f9af28f6..b6f569234 100644 --- a/leptos_server/src/local_resource.rs +++ b/leptos_server/src/local_resource.rs @@ -64,7 +64,7 @@ impl ArcLocalResource { pending().await } else { // LocalResources that are immediately available can cause a hydration error, - // because the future *looks* like it is alredy ready (and therefore would + // because the future *looks* like it is already ready (and therefore would // already have been rendered to html on the server), but in fact was ignored // on the server. the simplest way to avoid this is to ensure that we always // wait a tick before resolving any value for a localresource. @@ -298,7 +298,7 @@ impl LocalResource { pending().await } else { // LocalResources that are immediately available can cause a hydration error, - // because the future *looks* like it is alredy ready (and therefore would + // because the future *looks* like it is already ready (and therefore would // already have been rendered to html on the server), but in fact was ignored // on the server. the simplest way to avoid this is to ensure that we always // wait a tick before resolving any value for a localresource. diff --git a/reactive_graph/src/computed/async_derived/async_derived.rs b/reactive_graph/src/computed/async_derived/async_derived.rs index 6b4d2cc32..99f464c4c 100644 --- a/reactive_graph/src/computed/async_derived/async_derived.rs +++ b/reactive_graph/src/computed/async_derived/async_derived.rs @@ -29,7 +29,7 @@ use std::{ /// values that depend on it that it has changed. /// /// This is an arena-allocated type, which is `Copy` and is disposed when its reactive -/// [`Owner`](crate::owner::Owner) cleans up. For a reference-counted signal that livesas +/// [`Owner`](crate::owner::Owner) cleans up. For a reference-counted signal that lives as /// as long as a reference to it is alive, see [`ArcAsyncDerived`]. /// /// ## Examples diff --git a/reactive_graph/src/computed/inner.rs b/reactive_graph/src/computed/inner.rs index 84c43f52e..17355053d 100644 --- a/reactive_graph/src/computed/inner.rs +++ b/reactive_graph/src/computed/inner.rs @@ -15,7 +15,7 @@ pub struct MemoInner where S: Storage, { - /// Must always be aquired *after* the reactivity lock + /// Must always be acquired *after* the reactivity lock pub(crate) value: Arc>>, #[allow(clippy::type_complexity)] pub(crate) fun: Arc) -> (T, bool) + Send + Sync>, @@ -137,7 +137,7 @@ where }) }); - // Two locks are aquired, so order matters. + // Two locks are acquired, so order matters. let reactivity_lock = self.reactivity.write().or_poisoned(); { // Safety: Can block endlessly if the user is has a ReadGuard on the value diff --git a/reactive_graph/src/computed/memo.rs b/reactive_graph/src/computed/memo.rs index fab52f0ce..0f88fc0e4 100644 --- a/reactive_graph/src/computed/memo.rs +++ b/reactive_graph/src/computed/memo.rs @@ -27,7 +27,7 @@ use std::{fmt::Debug, hash::Hash, panic::Location}; /// not re-run the calculation when a source signal changes until they are read again. /// /// This is an arena-allocated type, which is `Copy` and is disposed when its reactive -/// [`Owner`](crate::owner::Owner) cleans up. For a reference-counted signal that livesas +/// [`Owner`](crate::owner::Owner) cleans up. For a reference-counted signal that lives as /// as long as a reference to it is alive, see [`ArcMemo`]. /// /// ``` diff --git a/reactive_graph/src/owner.rs b/reactive_graph/src/owner.rs index 880721397..1b1fbfbaa 100644 --- a/reactive_graph/src/owner.rs +++ b/reactive_graph/src/owner.rs @@ -1,4 +1,4 @@ -//! The reactive ownership model, which manages effect cancelation, cleanups, and arena allocation. +//! The reactive ownership model, which manages effect cancellation, cleanups, and arena allocation. #[cfg(feature = "hydration")] use hydration_context::SharedContext; @@ -32,7 +32,7 @@ pub use storage::*; pub use stored_value::{store_value, FromLocal, StoredValue}; /// A reactive owner, which manages -/// 1) the cancelation of [`Effect`](crate::effect::Effect)s, +/// 1) the cancellation of [`Effect`](crate::effect::Effect)s, /// 2) providing and accessing environment data via [`provide_context`] and [`use_context`], /// 3) running cleanup functions defined via [`Owner::on_cleanup`], and /// 4) an arena storage system to provide `Copy` handles via [`ArenaItem`], which is what allows diff --git a/reactive_graph/src/send_wrapper_ext.rs b/reactive_graph/src/send_wrapper_ext.rs index 21e986a0a..7c66a9d12 100644 --- a/reactive_graph/src/send_wrapper_ext.rs +++ b/reactive_graph/src/send_wrapper_ext.rs @@ -9,7 +9,7 @@ use std::{ /// An optional value that can always be sent between threads, even if its inner value /// in the `Some(_)` case would not be threadsafe. /// -/// This struct can be derefenced to `Option`. +/// This struct can be dereferenced to `Option`. /// /// If it has been given a local (`!Send`) value, that value is wrapped in a [`SendWrapper`], which /// allows sending it between threads but will panic if it is accessed or updated from a diff --git a/reactive_graph/src/signal/mapped.rs b/reactive_graph/src/signal/mapped.rs index 29c3a90c2..7a11968fd 100644 --- a/reactive_graph/src/signal/mapped.rs +++ b/reactive_graph/src/signal/mapped.rs @@ -22,7 +22,7 @@ use std::{ /// allowing you to read or write directly to one of its field. /// /// Tracking the mapped signal tracks changes to *any* part of the signal, and updating the signal notifies -/// and notifies *all* depenendencies of the signal. This is not a mechanism for fine-grained reactive updates +/// and notifies *all* dependencies of the signal. This is not a mechanism for fine-grained reactive updates /// to more complex data structures. Instead, it allows you to provide a signal-like API for wrapped types /// without exposing the original type directly to users. pub struct ArcMappedSignal { @@ -224,7 +224,7 @@ where /// allowing you to read or write directly to one of its field. /// /// Tracking the mapped signal tracks changes to *any* part of the signal, and updating the signal notifies -/// and notifies *all* depenendencies of the signal. This is not a mechanism for fine-grained reactive updates +/// and notifies *all* dependencies of the signal. This is not a mechanism for fine-grained reactive updates /// to more complex data structures. Instead, it allows you to provide a signal-like API for wrapped types /// without exposing the original type directly to users. pub struct MappedSignal { diff --git a/reactive_graph/src/traits.rs b/reactive_graph/src/traits.rs index 4bb0c5287..43bb4b86f 100644 --- a/reactive_graph/src/traits.rs +++ b/reactive_graph/src/traits.rs @@ -643,7 +643,7 @@ pub trait IntoInner { /// The type of the value contained in the signal. type Value; - /// Returns the inner value if this is the only reference to to the signal. + /// Returns the inner value if this is the only reference to the signal. /// Otherwise, returns `None` and drops this reference. /// # Panics /// Panics if the inner lock is poisoned. diff --git a/reactive_stores/README.md b/reactive_stores/README.md index d8ca1271f..7897f7bd2 100644 --- a/reactive_stores/README.md +++ b/reactive_stores/README.md @@ -5,7 +5,7 @@ Stores are a data structure for nested reactivity. The [`reactive_graph`](https://crates.io/crates/reactive_graph) crate provides primitives for fine-grained reactivity via signals, memos, and effects. -This crate extends that reactivity to support reactive access to nested dested, without the need to create nested signals. +This crate extends that reactivity to support reactive access to nested structs, without the need to create nested signals. Using the `#[derive(Store)]` macro on a struct creates a series of getters that allow accessing each field. Individual fields can then be read as if they were signals. Changes to parents will notify their children, but changing one sibling field will diff --git a/reactive_stores/src/option.rs b/reactive_stores/src/option.rs index b78411b5a..978555ecc 100644 --- a/reactive_stores/src/option.rs +++ b/reactive_stores/src/option.rs @@ -24,7 +24,7 @@ where /// /// This returns `None` if the subfield is currently `None`, /// and a new store subfield with the inner value if it is `Some`. This can be used in some - /// other reactive context, which will cause it to re-run if the field toggles betwen `None` + /// other reactive context, which will cause it to re-run if the field toggles between `None` /// and `Some(_)`. fn map( self, diff --git a/router/src/link.rs b/router/src/link.rs index 76c05ef7e..31ce27467 100644 --- a/router/src/link.rs +++ b/router/src/link.rs @@ -295,7 +295,7 @@ mod tests { assert!(!is_active_for("/else/where", "/", f)); assert!(!is_active_for("/no/where/", "/", f)); - // mismatch either side all cominations of trailing slashes + // mismatch either side all combinations of trailing slashes assert!(!is_active_for("/level", "/item", f)); assert!(!is_active_for("/level", "/item/", f)); assert!(!is_active_for("/level/", "/item", f)); @@ -383,7 +383,7 @@ mod tests { // // assert!(is_active_for("/", "/item", true)); // - // Perhaps there needs to be a flag such that aria-curently applies only the _same level_, e.g + // Perhaps there needs to be a flag such that aria-curent applies only the _same level_, e.g // assert!(is_same_level("/", "/")) // assert!(is_same_level("/", "/anything")) // assert!(!is_same_level("/", "/some/")) diff --git a/server_fn/tests/server_macro.rs b/server_fn/tests/server_macro.rs index c117dbb97..8363dbbdd 100644 --- a/server_fn/tests/server_macro.rs +++ b/server_fn/tests/server_macro.rs @@ -1,4 +1,4 @@ -// The trybuild output has slightly different error message ouptut for +// The trybuild output has slightly different error message output for // different combinations of features. Since tests are run with `test-all-features` // multiple combinations of features are tested. This ensures this file is only // run when **only** the browser feature is enabled. diff --git a/tachys/src/html/attribute/custom.rs b/tachys/src/html/attribute/custom.rs index 717006fdf..eedde99c0 100644 --- a/tachys/src/html/attribute/custom.rs +++ b/tachys/src/html/attribute/custom.rs @@ -10,7 +10,7 @@ use crate::{ }; use std::{borrow::Cow, sync::Arc}; -/// Adds a custom attribute with any key-value combintion. +/// Adds a custom attribute with any key-value combination. #[inline(always)] pub fn custom_attribute(key: K, value: V) -> CustomAttr where diff --git a/tachys/src/view/mod.rs b/tachys/src/view/mod.rs index 8006d2228..550b154a5 100644 --- a/tachys/src/view/mod.rs +++ b/tachys/src/view/mod.rs @@ -476,7 +476,7 @@ pub enum Position { LastChild, } -/// Declares that this type can be converted into some other type, which can be renderered. +/// Declares that this type can be converted into some other type, which can be rendered. pub trait IntoRender { /// The renderable type into which this type can be converted. type Output;