From c776e040d9a677646b18e8a6758e17ed656d69d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Tue, 3 Dec 2019 19:04:30 +0100 Subject: [PATCH] Don't use trait objects without an explicit `dyn` --- src/sdl2/ttf/context.rs | 2 +- src/sdl2/ttf/font.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)