1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-07-14 01:54:50 +02:00

Fix DerefMut example

This commit is contained in:
LukeMathWalker
2025-07-07 17:25:24 +02:00
parent 294c216eb9
commit ede0c38202

View File

@ -19,12 +19,12 @@ impl Username {
}
}
impl DerefMut for Username {
impl std::ops::DerefMut for Username { // ‼️
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
# impl Deref for Username {
# impl std::ops::Deref for Username {
# type Target = str;
#
# fn deref(&self) -> &Self::Target {