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:
parent
80b214117e
commit
d966750535
@ -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() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user