From 17eadcff0383241cba9d6e0cc6af6a50c1e6e4f8 Mon Sep 17 00:00:00 2001 From: a-kenji Date: Sat, 18 Nov 2023 17:51:52 +0100 Subject: [PATCH] Fix small typos --- doc_src/cmds/fish_opt.rst | 2 +- fish-rust/src/ast.rs | 2 +- fish-rust/src/env/mod.rs | 2 +- fish-rust/src/event.rs | 2 +- fish-rust/src/proc.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc_src/cmds/fish_opt.rst b/doc_src/cmds/fish_opt.rst index 7c5af0fbe..685b8ccd2 100644 --- a/doc_src/cmds/fish_opt.rst +++ b/doc_src/cmds/fish_opt.rst @@ -28,7 +28,7 @@ The following ``argparse`` options are available: The option being defined will only allow the long flag name to be used. The short flag name must still be defined (i.e., **--short** must be specified) but it cannot be used when parsing arguments using this option specification. **-o** or **--optional-val** - Tthe option being defined can take a value, but it is optional rather than required. If the option is seen more than once when parsing arguments, only the last value seen is saved. This means the resulting flag variable created by ``argparse`` will zero elements if no value was given with the option else it will have exactly one element. + The option being defined can take a value, but it is optional rather than required. If the option is seen more than once when parsing arguments, only the last value seen is saved. This means the resulting flag variable created by ``argparse`` will zero elements if no value was given with the option else it will have exactly one element. **-r** or **--required-val** The option being defined requires a value. If the option is seen more than once when parsing arguments, only the last value seen is saved. This means the resulting flag variable created by ``argparse`` will have exactly one element. diff --git a/fish-rust/src/ast.rs b/fish-rust/src/ast.rs index 102da72e7..b01740629 100644 --- a/fish-rust/src/ast.rs +++ b/fish-rust/src/ast.rs @@ -770,7 +770,7 @@ macro_rules! implement_acceptor_for_branch { } } -/// Visit the given fields in order, returning whether the visitation succeded. +/// Visit the given fields in order, returning whether the visitation succeeded. macro_rules! visitor_accept_field { ( $Self:ident, diff --git a/fish-rust/src/env/mod.rs b/fish-rust/src/env/mod.rs index c6610a8d7..f71bcdc47 100644 --- a/fish-rust/src/env/mod.rs +++ b/fish-rust/src/env/mod.rs @@ -9,7 +9,7 @@ pub use environment::*; use std::sync::atomic::{AtomicBool, AtomicUsize}; pub use var::*; -/// Limit `read` to 100 MiB (bytes, not wide chars) by default. This can be overriden with the +/// Limit `read` to 100 MiB (bytes, not wide chars) by default. This can be overridden with the /// `fish_read_limit` variable. pub const DEFAULT_READ_BYTE_LIMIT: usize = 100 * 1024 * 1024; diff --git a/fish-rust/src/event.rs b/fish-rust/src/event.rs index 8d190845d..35ab88710 100644 --- a/fish-rust/src/event.rs +++ b/fish-rust/src/event.rs @@ -774,7 +774,7 @@ pub fn fire_delayed(parser: &Parser) { for event in to_send { if event.is_blocked(parser) { if blocked_events.is_none() { - blocked_events = Some(BLOCKED_EVENTS.lock().expect("Mutex posioned")); + blocked_events = Some(BLOCKED_EVENTS.lock().expect("Mutex poisoned")); } blocked_events.as_mut().unwrap().push(event); } else { diff --git a/fish-rust/src/proc.rs b/fish-rust/src/proc.rs index 1af166d32..21cca2c82 100644 --- a/fish-rust/src/proc.rs +++ b/fish-rust/src/proc.rs @@ -1416,7 +1416,7 @@ fn process_mark_finished_children(parser: &Parser, block_ok: bool) { let pid = unsafe { libc::waitpid(proc.pid(), &mut statusv, WNOHANG | WUNTRACED | WCONTINUED) }; - assert!(pid <= 0 || pid == proc.pid(), "Unexpcted waitpid() return"); + assert!(pid <= 0 || pid == proc.pid(), "Unexpected waitpid() return"); if pid <= 0 { continue; }