Skip to content

Commit f8daa0a

Browse files
committed
Fix typo
1 parent 03ba5c3 commit f8daa0a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

content/blog/2025-06-14-hypershell-release.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -733,9 +733,7 @@ Looking at the generic parameters, you might notice that `SimpleExec<CommandPath
733733
Within the `where` clause, we utilize dependency injection to require other dependencies from the generic `Context`. The first trait, `CanExtractCommandArg`, is defined as follows:
734734

735735
```rust
736-
#[cgp_component {
737-
provider: CommandArgExtractor,
738-
}]
736+
#[cgp_component(CommandArgExtractor)]
739737
pub trait CanExtractCommandArg<Arg>: HasCommandArgType {
740738
fn extract_command_arg(&self, _phantom: PhantomData<Arg>) -> Self::CommandArg;
741739
}
@@ -902,7 +900,7 @@ The `CommandNotFound` struct holds a reference to the `Command` we're trying to
902900

903901
Similar to `ErrorRaiser`, CGP allows the `ErrorWrapper` implementation to be chosen by the context to handle errors differently. For instance, the `HypershellCli` context uses the `DebugAnyhowError` provider from `cgp-error-anyhow`. This provider builds a string using the `Debug` implementation and then calls `anyhow::Error::context` with the formatted string. However, if desired, a user of Hypershell is free to override this behavior, such as printing the full command or wrapping the error in other ways.
904902

905-
Since `CommandNotFound` contains a lifetime, when we specify the constraint, we need to add a [**higher-ranked trait bound (HRTB)**]((https://doc.rust-lang.org/nomicon/hrtb.html) (`for<'a>`) to the constraint. This ensures we can always wrap the error for any lifetime. While it's possible to pass an owned `Command` value without a lifetime here, this isn't always feasible when the detail originates from argument references. Furthermore, using a reference encourages the wrapper handler to extract only essential details, avoiding the bloating of the error value with large wrapped values.
903+
Since `CommandNotFound` contains a lifetime, when we specify the constraint, we need to add a [**higher-ranked trait bound (HRTB)**](https://doc.rust-lang.org/nomicon/hrtb.html) (`for<'a>`) to the constraint. This ensures we can always wrap the error for any lifetime. While it's possible to pass an owned `Command` value without a lifetime here, this isn't always feasible when the detail originates from argument references. Furthermore, using a reference encourages the wrapper handler to extract only essential details, avoiding the bloating of the error value with large wrapped values.
906904

907905
### Input Type
908906

0 commit comments

Comments
 (0)