Skip to content

Commit 661ef31

Browse files
authored
rust: Fix lifetime elision for nightly (#2812)
Signed-off-by: Ryan Northey <[email protected]>
1 parent 1b32465 commit 661ef31

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rust/runner/src/runner/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ macro_rules! runner {
3434
}
3535

3636
fn commands(&self) -> toolshed_runner::runner::CommandsFn<'_, $handler_type> {
37-
let mut commands: toolshed_runner::runner::CommandsFn<$handler_type> = std::collections::HashMap::new();
37+
let mut commands: toolshed_runner::runner::CommandsFn<'_, $handler_type> = std::collections::HashMap::new();
3838
$(
3939
commands.insert($cmd_name, std::sync::Arc::new(|s: &std::sync::Arc<dyn toolshed_runner::runner::Runner<$handler_type>>| {
4040
let s = s.as_any().downcast_ref::<Self>().expect("Downcast failed").clone();
@@ -75,7 +75,7 @@ pub type CommandsFn<'a, T> = HashMap<&'a str, CommandFn<T>>;
7575
#[async_trait]
7676
pub trait Runner<T: Handler + 'static>: Any + AsAny + Send + Sync {
7777
fn as_arc(&self) -> Arc<dyn Runner<T>>;
78-
fn commands(&self) -> CommandsFn<T>;
78+
fn commands(&self) -> CommandsFn<'_, T>;
7979
fn get_handler(&self) -> &T;
8080

8181
fn get_command(&self) -> Box<&dyn Command> {

rust/runner/src/test/patch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ impl Patch {
354354
})
355355
});
356356

357-
let mut commands: runner::CommandsFn<DummyHandler> = HashMap::new();
357+
let mut commands: runner::CommandsFn<'a, DummyHandler> = HashMap::new();
358358
commands.insert("COMMAND_NAME", command.clone());
359359
commands
360360
}

0 commit comments

Comments
 (0)