Skip to content

Commit

Permalink
docs: add a note about impl Future
Browse files Browse the repository at this point in the history
  • Loading branch information
39555 committed Oct 13, 2024
1 parent 8fdba4d commit 46eeec4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions brush-core/src/builtins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ pub trait Command: Parser {
/// # Arguments
///
/// * `context` - The context in which the command is being executed.
// NOTE: we use desugared async here because we need a Send marker
fn execute(
&self,
context: commands::ExecutionContext<'_>,
Expand Down
1 change: 1 addition & 0 deletions brush-interactive/src/interactive_shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ pub trait InteractiveShell {
/// Runs the interactive shell loop, reading commands from standard input and writing
/// results to standard output and standard error. Continues until the shell
/// normally exits or until a fatal error occurs.
// NOTE: we use desugared async here because [async_fn_in_trait] "warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified"
fn run_interactively(&mut self) -> impl std::future::Future<Output = Result<(), ShellError>> {
async {
// TODO: Consider finding a better place for this.
Expand Down

0 comments on commit 46eeec4

Please sign in to comment.