Skip to content

Commit

Permalink
Merge pull request #2658 from kangxiaoning/deref
Browse files Browse the repository at this point in the history
correct the signature of the `deref` method
  • Loading branch information
steveklabnik authored Mar 24, 2021
2 parents 3e4f478 + 4758070 commit b54090a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion listings/ch15-smart-pointers/listing-15-10/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::ops::Deref;
impl<T> Deref for MyBox<T> {
type Target = T;

fn deref(&self) -> &T {
fn deref(&self) -> &Self::Target {
&self.0
}
}
Expand Down

0 comments on commit b54090a

Please sign in to comment.