This commit is contained in:
haraldh 2020-03-03 14:16:51 +00:00
parent bc07729890
commit 12caec03a0
18 changed files with 28810 additions and 256 deletions

View file

@ -335,7 +335,7 @@
}
}
fn main() -> Result<(), Box<std::error::Error + Send + Sync>> {
fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
use mycrate::func1;
use mycrate::ErrorKind;
use std::error::Error;
@ -350,7 +350,7 @@ fn main() -> Result<(), Box<std::error::Error + Send + Sync>> {
}
eprintln!();
let mut s: &Error = &e;
let mut s: &dyn Error = &e;
while let Some(c) = s.source() {
if let Some(ioerror) = c.downcast_ref::<io::Error>() {
eprintln!("caused by: std::io::Error: {}", ioerror);