Auto merge of #31959 - teoryn:patch-4, r=Manishearth
This commit is contained in:
commit
953f6c9cc9
1 changed files with 1 additions and 1 deletions
|
@ -259,7 +259,7 @@ thread::spawn(move || {
|
|||
```
|
||||
|
||||
First, we call `lock()`, which acquires the mutex's lock. Because this may fail,
|
||||
it returns an `Result<T, E>`, and because this is just an example, we `unwrap()`
|
||||
it returns a `Result<T, E>`, and because this is just an example, we `unwrap()`
|
||||
it to get a reference to the data. Real code would have more robust error handling
|
||||
here. We're then free to mutate it, since we have the lock.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue