rust/src/libstd
bors ca2639e82e Auto merge of #55014 - ljedrz:lazyboye_unwraps, r=matthewjasper
Prefer unwrap_or_else to unwrap_or in case of function calls/allocations

The contents of `unwrap_or` are evaluated eagerly, so it's not a good pick in case of function calls and allocations. This PR also changes a few `unwrap_or`s with `unwrap_or_default`.

An added bonus is that in some cases this change also reveals if the object it's called on is an `Option` or a `Result` (based on whether the closure takes an argument).
2018-10-20 11:22:48 +00:00
..
collections Auto merge of #53804 - RalfJung:ptr-invalid, r=nagisa 2018-09-16 18:03:39 +00:00
ffi make CStr::from_bytes_with_nul_unchecked() a const fn 2018-10-02 04:25:40 -07:00
io Auto merge of #53517 - phungleson:fix-impl-from-for-error, r=frewsxcv 2018-10-07 22:00:04 +00:00
net Rollup merge of #53522 - phungleson:fix-impl-from-for-addr, r=TimNN 2018-09-18 10:21:33 +02:00
os Move std::os::raw::c_void into libcore and re-export in libstd 2018-09-14 16:19:59 +01:00
prelude Reformat std prelude source to show it is the sum of core and alloc preludes 2018-07-07 23:16:27 +02:00
sync Fix tracking issue for Once::is_completed 2018-10-07 12:00:41 +02:00
sys Prefer unwrap_or_else to unwrap_or in case of function calls/allocations 2018-10-19 09:45:45 +02:00
sys_common Improve output if no_lookup_host_duplicates fails 2018-09-15 17:17:35 +02:00
tests Breaking change upgrades 2018-09-04 13:22:08 -06:00
thread Rollup merge of #54646 - vn971:fix_std_thread_sleep, r=frewsxcv 2018-10-18 12:54:42 +08:00
alloc.rs Bump to 1.31.0 and bootstrap from 1.30 beta 2018-09-27 20:52:53 -07:00
ascii.rs Remove unstable and deprecated APIs 2018-07-30 18:18:23 +02:00
build.rs Prefer unwrap_or_else to unwrap_or in case of function calls/allocations 2018-10-19 09:45:45 +02:00
Cargo.toml std: Implement TLS for wasm32-unknown-unknown 2018-10-11 09:57:55 -07:00
env.rs make reference to dirs crate clickable in terminals 2018-07-12 12:48:10 +02:00
error.rs Rollup merge of #53523 - phungleson:fix-impl-from-for-std-error, r=GuillaumeGomez 2018-10-04 12:20:05 +02:00
f32.rs Add must_use on copysign 2018-10-18 08:35:09 -07:00
f64.rs Add must_use on copysign 2018-10-18 08:35:09 -07:00
fs.rs "(using ..." doesn't have the matching ")" 2018-10-10 01:09:18 -07:00
future.rs Remove spawning from task::Context 2018-09-19 15:01:19 -07:00
keyword_docs.rs Add struct keyword doc 2018-08-23 23:50:05 +02:00
lib.rs Stabilize min_const_fn 2018-10-05 10:36:14 +02:00
macros.rs Fix incorrect link in println! documentation 2018-10-14 08:14:21 -04:00
memchr.rs Fix typos found by codespell. 2018-08-19 17:41:28 +02:00
num.rs Stabilize num::NonZeroU* 2018-05-16 19:11:31 +02:00
panic.rs it's auto traits that make for automatic implementations 2018-10-08 17:44:33 +02:00
panicking.rs rustc: Allow #[no_mangle] anywhere in a crate 2018-10-06 13:57:30 -07:00
path.rs Add links to std::char::REPLACEMENT_CHARACTER from docs. 2018-08-11 15:42:35 -04:00
primitive_docs.rs Cleans trailing whitespace 2018-10-02 13:59:33 -03:00
process.rs document the platform-specific behavior of Command::current_dir 2018-08-20 17:02:45 -04:00
rt.rs Deny bare trait objects in src/libstd. 2018-07-10 20:35:36 +02:00
time.rs Stabilize SystemTime::UNIX_EPOCH 2018-05-28 18:24:01 -06:00