Skip to content

Commit

Permalink
Use explicit "dyn" keyword
Browse files Browse the repository at this point in the history
Trait objects without "dyn" keyword is now deprecated.
  • Loading branch information
rom1v committed Sep 7, 2019
1 parent 766505c commit 32b169f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions relay-rust/src/execution_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl error::Error for ProcessStatusError {
"Execution terminated with failure"
}

fn cause(&self) -> Option<&error::Error> {
fn cause(&self) -> Option<&dyn error::Error> {
None
}
}
Expand All @@ -134,7 +134,7 @@ impl error::Error for ProcessIoError {
"Execution I/O failed"
}

fn cause(&self) -> Option<&error::Error> {
fn cause(&self) -> Option<&dyn error::Error> {
Some(&self.error)
}
}
Expand All @@ -158,7 +158,7 @@ impl error::Error for CommandExecutionError {
}
}

fn cause(&self) -> Option<&error::Error> {
fn cause(&self) -> Option<&dyn error::Error> {
match *self {
CommandExecutionError::ProcessIo(ref err) => Some(err),
CommandExecutionError::ProcessStatus(ref err) => Some(err),
Expand Down
2 changes: 1 addition & 1 deletion relay-rust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use std::time::Duration;
const TAG: &str = "Main";
const REQUIRED_APK_VERSION_CODE: &str = "6";

const COMMANDS: &[&Command] = &[
const COMMANDS: &[&dyn Command] = &[
&InstallCommand,
&UninstallCommand,
&ReinstallCommand,
Expand Down

0 comments on commit 32b169f

Please sign in to comment.