mirror of
https://github.com/google/comprehensive-rust.git
synced 2024-11-25 01:16:12 +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:
parent
80b214117e
commit
d966750535
@ -18,7 +18,9 @@ impl<T> Point<T> {
|
||||
(&self.x, &self.y)
|
||||
}
|
||||
|
||||
// fn set_x(&mut self, x: T)
|
||||
fn set_x(&mut self, x: T) {
|
||||
self.x = x;
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
Loading…
Reference in New Issue
Block a user