Skip to content

Commit

Permalink
Tag trait objects with the 'dyn' keyword
Browse files Browse the repository at this point in the history
The dyn keyword is now mandatory for trait objects (RFC 2113)
and rustc emits a warning where it is missing.
  • Loading branch information
phi-gamma committed Nov 8, 2019
1 parent 0b6b98e commit bc71907
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ impl<'a, T: ToSongPath> ToSongPath for &'a T {
}
}

impl ToSongPath for AsRef<str> {
impl ToSongPath for dyn AsRef<str> {
fn to_path(&self) -> &str {
self.as_ref()
}
Expand Down
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ pub enum Error {
pub type Result<T> = result::Result<T, Error>;

impl StdError for Error {
fn cause(&self) -> Option<&StdError> {
fn cause(&self) -> Option<&dyn StdError> {
match *self {
Error::Io(ref err) => Some(err),
Error::Parse(ref err) => Some(err),
Expand Down

0 comments on commit bc71907

Please sign in to comment.