diff options
| author | frankamp <frankamp@gmail.com> | 2015-05-30 13:31:46 -0700 |
|---|---|---|
| committer | frankamp <frankamp@gmail.com> | 2015-05-30 13:31:46 -0700 |
| commit | ee4b58c7925a914abac8ebc7a0fc0be0cb6cb0c7 (patch) | |
| tree | 4ce157c9809224838c70e402564963305d60b52d /src/liballoc_jemalloc | |
| parent | ee1ba33c4c679e679b0fd95aaf7145e7ebc275d4 (diff) | |
| download | rust-ee4b58c7925a914abac8ebc7a0fc0be0cb6cb0c7.tar.gz rust-ee4b58c7925a914abac8ebc7a0fc0be0cb6cb0c7.zip | |
Fixes consistency in before/after example
The doc indicates that you can replace 'before' with 'after' showing the use of try!. The two examples should be equivalent, but they are not. In the File::create we were inducing a panic before in case of error, not propagating. It is important for newbies (like myself) to understand that try! propagates failures, while unwrap can induce a panic. The other alternative is to make the 'before' File::create also manually handle Err like the other calls. Either way it would be consistent.
Diffstat (limited to 'src/liballoc_jemalloc')
0 files changed, 0 insertions, 0 deletions
