about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-02-09 00:53:55 +0100
committerGitHub <noreply@github.com>2020-02-09 00:53:55 +0100
commit2be062a4b08c4d0c108f41c8714f380cb5a05873 (patch)
tree58d1feb4f913b50b671261452712427c1e7b3ea2 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
parent664d87f9b1e54421e9fa77988e92be53337821fd (diff)
parent8251e12950159c5802dd3995b14be7cf4fa99acd (diff)
downloadrust-2be062a4b08c4d0c108f41c8714f380cb5a05873.tar.gz
rust-2be062a4b08c4d0c108f41c8714f380cb5a05873.zip
Rollup merge of #68918 - brson:unwrapdoc, r=Dylan-DPC
Don't use the word "unwrap" to describe "unwrap" methods

It's tautological, and "unwrap" is essentially Rust-specific jargon.

I was teaching a newbie some Rust, and doing the usual hand-waving about error handling using unwrap. They asked what 'unwrap' means. I said look it up in the docs. The docs read (paraphrased) "unwrap unwraps". I was embarrassed.

This changes all the Option/Result functions with unwrapping behavior to use a variation on a single description:

> "Returns the contained `Some/Ok` value [or ...]."

It also renames the closure of `Result::unwrap_or_else` to `default` for consistency with `Option`, and perhaps makes a few other small tweaks.

Previous: https://github.com/rust-lang/rust/pull/68849
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions