point supposed to be immutable in this example
This commit is contained in:
parent
750f2c63f2
commit
0c390d2f8e
1 changed files with 1 additions and 1 deletions
|
|
@ -169,7 +169,7 @@ struct Point {
|
|||
y: Cell<i32>,
|
||||
}
|
||||
|
||||
let mut point = Point { x: 5, y: Cell::new(6) };
|
||||
let point = Point { x: 5, y: Cell::new(6) };
|
||||
|
||||
point.y.set(7);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue