diff --git a/src/sdl2/ttf/context.rs b/src/sdl2/ttf/context.rs index ad3d5721..52ca8b3b 100644 --- a/src/sdl2/ttf/context.rs +++ b/src/sdl2/ttf/context.rs @@ -96,7 +96,7 @@ impl error::Error for InitError { } } - fn cause(&self) -> Option<&error::Error> { + fn cause(&self) -> Option<&dyn error::Error> { match *self { InitError::AlreadyInitializedError => { None diff --git a/src/sdl2/ttf/font.rs b/src/sdl2/ttf/font.rs index 1fac3343..14aa5681 100644 --- a/src/sdl2/ttf/font.rs +++ b/src/sdl2/ttf/font.rs @@ -69,7 +69,7 @@ impl error::Error for FontError { } } - fn cause(&self) -> Option<&error::Error> { + fn cause(&self) -> Option<&dyn error::Error> { match *self { FontError::InvalidLatin1Text(ref error) => { Some(error)