3 ms·
> The only difference between the two is inlining the map method, no? This may be the "sufficiently smart compiler" fallacy, but that really doesn't seem very h
by masklinn 12y ago
> The only difference between the two is inlining the map method, no? This may be the "sufficiently smart compiler" fallacy, but that really doesn't seem very hard.
It doesn't even rely on a smart compiler: https://github.com/rust-lang/rust/blob/master/src/libcore/result.rs#L514 https://github.com/rust-lang/rust/blob/master/src/libcore/re...
The #[inline] attribute is defined as a "standard (though very strong) inline hint" (there's also #[inline(never)] and #[inline(always)])