1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-05-15 07:06:52 +02:00

Uncomment setter in generics example (#1978)

I don't think it helps to have the example of a setter commented out in
the example. Uncommenting it and implementing it normally is more clear.
This commit is contained in:
Nicole L 2024-04-12 08:15:46 -07:00 committed by GitHub
parent 80b214117e
commit d966750535
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,7 +18,9 @@ impl<T> Point<T> {
(&self.x, &self.y) (&self.x, &self.y)
} }
// fn set_x(&mut self, x: T) fn set_x(&mut self, x: T) {
self.x = x;
}
} }
fn main() { fn main() {