Преглед на файлове

chore: fix some typos in comments (#2340)

Signed-off-by: alongdate <alongyear@outlook.com>
alongdate преди 1 година
родител
ревизия
a5b4ceed39
променени са 5 файла, в които са добавени 5 реда и са изтрити 5 реда
  1. 1 1
      examples/file_explorer.rs
  2. 1 1
      examples/global.rs
  3. 1 1
      examples/nested_listeners.rs
  4. 1 1
      examples/read_size.rs
  5. 1 1
      packages/cli/src/server/web/server.rs

+ 1 - 1
examples/file_explorer.rs

@@ -92,7 +92,7 @@ impl Files {
         let paths = match std::fs::read_dir(cur_path) {
         let paths = match std::fs::read_dir(cur_path) {
             Ok(e) => e,
             Ok(e) => e,
             Err(err) => {
             Err(err) => {
-                let err = format!("An error occured: {err:?}");
+                let err = format!("An error occurred: {err:?}");
                 self.err = Some(err);
                 self.err = Some(err);
                 self.path_stack.pop();
                 self.path_stack.pop();
                 return;
                 return;

+ 1 - 1
examples/global.rs

@@ -48,7 +48,7 @@ fn Display() -> Element {
 
 
 #[component]
 #[component]
 fn Reset() -> Element {
 fn Reset() -> Element {
-    // Not all write methods are availale on global signals since `write` requires a mutable reference. In these cases,
+    // Not all write methods are available on global signals since `write` requires a mutable reference. In these cases,
     // We can simply pull out the actual signal using the signal() method.
     // We can simply pull out the actual signal using the signal() method.
     let mut as_signal = use_hook(|| COUNT.signal());
     let mut as_signal = use_hook(|| COUNT.signal());
 
 

+ 1 - 1
examples/nested_listeners.rs

@@ -2,7 +2,7 @@
 //!
 //!
 //! This example showcases how to control event bubbling from child to parents.
 //! This example showcases how to control event bubbling from child to parents.
 //!
 //!
-//! Both web and desktop support bubbling and bubble cancelation.
+//! Both web and desktop support bubbling and bubble cancellation.
 
 
 use dioxus::prelude::*;
 use dioxus::prelude::*;
 
 

+ 1 - 1
examples/read_size.rs

@@ -1,6 +1,6 @@
 //! Read the size of elements using the MountedData struct.
 //! Read the size of elements using the MountedData struct.
 //!
 //!
-//! Whenever an Element is finally mounted to the Dom, its data is avaiable to be read.
+//! Whenever an Element is finally mounted to the Dom, its data is available to be read.
 //! These fields can typically only be read asynchronously, since various renderers need to release the main thread to
 //! These fields can typically only be read asynchronously, since various renderers need to release the main thread to
 //! perform layout and painting.
 //! perform layout and painting.
 
 

+ 1 - 1
packages/cli/src/server/web/server.rs

@@ -220,7 +220,7 @@ pub fn get_rustls_with_mkcert(web_config: &WebHttpsConfig) -> Result<(String, St
         Err(e) => {
         Err(e) => {
             match e.kind() {
             match e.kind() {
                 io::ErrorKind::NotFound => tracing::error!("mkcert is not installed. See https://github.com/FiloSottile/mkcert#installation for installation instructions."),
                 io::ErrorKind::NotFound => tracing::error!("mkcert is not installed. See https://github.com/FiloSottile/mkcert#installation for installation instructions."),
-                e => tracing::error!("an error occured while generating mkcert certificates: {}", e.to_string()),
+                e => tracing::error!("an error occurred while generating mkcert certificates: {}", e.to_string()),
             };
             };
             return Err("failed to generate mkcert certificates".into());
             return Err("failed to generate mkcert certificates".into());
         }
         }