I have the code for iotedge which using the following:
fn from(err: &'a Error) -> Self {
match Fail::find_root_cause(err).downcast_ref::<ErrorKind>() {
Some(ErrorKind::NotFound(_)) => ModuleRuntimeErrorReason::NotFound,
_ => ModuleRuntimeErrorReason::Other,
}
}
While compiling, I get the following:
error: trait objects without an explicit `dyn` are deprecated
| --> edgelet-docker/src/error.rs:151:15
| |
| 151 | match Fail::find_root_cause(err).downcast_ref::<ErrorKind>() {
| | ^^^^ help: use `dyn`: `<dyn Fail>`
| |
Being a newbie, unable to understand how do I fix it. Any input would be of great help