Skip to content

Commit

Permalink
correct the signature of the deref method
Browse files Browse the repository at this point in the history
  • Loading branch information
kangxiaoning committed Mar 21, 2021
1 parent 3e4f478 commit 4758070
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 4758070

Please sign in to comment.