Skip to content

Commit d429a4e

Browse files
author
Tymoteusz Jankowski
committed
s/immutable/my_struct
1 parent beb072a commit d429a4e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libcore/cell.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,11 @@ use ptr;
209209
/// let new_value = 100;
210210
///
211211
/// // ERROR, because my_struct is immutable
212-
/// // immutable.regular_field = new_value;
212+
/// // my_struct.regular_field = new_value;
213213
///
214214
/// // WORKS, although `my_struct` is immutable, field `special_field` is mutable because it is Cell
215-
/// immutable.special_field.set(new_value);
216-
/// assert_eq!(immutable.special_field.get(), new_value);
215+
/// my_struct.special_field.set(new_value);
216+
/// assert_eq!(my_struct.special_field.get(), new_value);
217217
/// ```
218218
///
219219
/// See the [module-level documentation](index.html) for more.

0 commit comments

Comments
 (0)