From e7c19765282eb31daf85e5eba26e13828bc2f6c7 Mon Sep 17 00:00:00 2001 From: yutotnh <57719497+yutotnh@users.noreply.github.com> Date: Thu, 16 Jun 2022 09:55:10 +0900 Subject: [PATCH] docs: fix some typos in comments (#4069) fix: some typos --- src/context.rs | 2 +- src/modules/custom.rs | 2 +- src/serde_utils.rs | 2 +- src/utils.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/context.rs b/src/context.rs index 00415d8d..56f71983 100644 --- a/src/context.rs +++ b/src/context.rs @@ -38,7 +38,7 @@ pub struct Context<'a> { /// E.g. when navigating to a PSDrive in PowerShell, or a path without symlinks resolved. pub logical_dir: PathBuf, - /// A struct containing directory contents in a lookup-optimised format. + /// A struct containing directory contents in a lookup-optimized format. dir_contents: OnceCell, /// Properties to provide to modules. diff --git a/src/modules/custom.rs b/src/modules/custom.rs index f9971958..603fa818 100644 --- a/src/modules/custom.rs +++ b/src/modules/custom.rs @@ -110,7 +110,7 @@ fn get_shell<'a, 'b>( } /// Attempt to run the given command in a shell by passing it as either `stdin` or an argument to `get_shell()`, -/// depending on the configuration or by invoking a platform-specific falback shell if `shell` is empty. +/// depending on the configuration or by invoking a platform-specific fallback shell if `shell` is empty. fn shell_command(cmd: &str, config: &CustomConfig, context: &Context) -> Option { let (shell, shell_args) = get_shell(config.shell.0.as_ref(), context); let mut use_stdin = config.use_stdin; diff --git a/src/serde_utils.rs b/src/serde_utils.rs index 62b9ab6f..05e00cd5 100644 --- a/src/serde_utils.rs +++ b/src/serde_utils.rs @@ -115,7 +115,7 @@ impl<'de> Deserializer<'de> for ValueDeserializer<'de> { visitor.visit_some(self) } - // Handle ignored Values. (Values at unkown keys in TOML) + // Handle ignored Values. (Values at unknown keys in TOML) fn deserialize_ignored_any(self, visitor: V) -> Result where V: Visitor<'de>, diff --git a/src/utils.rs b/src/utils.rs index d2861494..a2e66d57 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -59,7 +59,7 @@ pub fn get_command_string_output(command: CommandOutput) -> String { /// Attempt to resolve `binary_name` from and creates a new `Command` pointing at it /// This allows executing cmd files on Windows and prevents running executable from cwd on Windows -/// This function also initialises std{err,out,in} to protect against processes changing the console mode +/// This function also initializes std{err,out,in} to protect against processes changing the console mode pub fn create_command>(binary_name: T) -> Result { let binary_name = binary_name.as_ref(); log::trace!("Creating Command for binary {:?}", binary_name);