Add more type signatures to the docs; tweak a few of them.
Someone reading the docs won't know what the types of various things are, so this adds them in a few meaningful places to help with comprehension. cc #13423.
This commit is contained in:
parent
0156af156d
commit
5b109a1754
5 changed files with 44 additions and 27 deletions
|
|
@ -21,12 +21,11 @@ also be used. See that function for more details.
|
|||
|
||||
```
|
||||
use std::unstable::finally::Finally;
|
||||
# fn always_run_this() {}
|
||||
|
||||
(|| {
|
||||
// ...
|
||||
}).finally(|| {
|
||||
always_run_this();
|
||||
// this code is always run
|
||||
})
|
||||
```
|
||||
*/
|
||||
|
|
@ -158,4 +157,3 @@ fn test_compact() {
|
|||
do_some_fallible_work.finally(
|
||||
but_always_run_this_function);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue