Skip to content

Commit bc71907

Browse files
committed
Tag trait objects with the 'dyn' keyword
The dyn keyword is now mandatory for trait objects (RFC 2113) and rustc emits a warning where it is missing.
1 parent 0b6b98e commit bc71907

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/convert.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ impl<'a, T: ToSongPath> ToSongPath for &'a T {
301301
}
302302
}
303303

304-
impl ToSongPath for AsRef<str> {
304+
impl ToSongPath for dyn AsRef<str> {
305305
fn to_path(&self) -> &str {
306306
self.as_ref()
307307
}

src/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ pub enum Error {
182182
pub type Result<T> = result::Result<T, Error>;
183183

184184
impl StdError for Error {
185-
fn cause(&self) -> Option<&StdError> {
185+
fn cause(&self) -> Option<&dyn StdError> {
186186
match *self {
187187
Error::Io(ref err) => Some(err),
188188
Error::Parse(ref err) => Some(err),

0 commit comments

Comments
 (0)