You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-07-14 10:04:19 +02:00
Fix DerefMut example
This commit is contained in:
@ -19,12 +19,12 @@ impl Username {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DerefMut for Username {
|
impl std::ops::DerefMut for Username { // ‼️
|
||||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||||
&mut self.0
|
&mut self.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# impl Deref for Username {
|
# impl std::ops::Deref for Username {
|
||||||
# type Target = str;
|
# type Target = str;
|
||||||
#
|
#
|
||||||
# fn deref(&self) -> &Self::Target {
|
# fn deref(&self) -> &Self::Target {
|
||||||
|
Reference in New Issue
Block a user