Skip to content

Commit 73fb318

Browse files
committed
Tentatively #[inline] Option::from
Probably not gonna have much of an impact because into can't be inlined.
1 parent 57ee5cf commit 73fb318

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/core/src/option.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1973,6 +1973,7 @@ impl<T> const From<T> for Option<T> {
19731973
///
19741974
/// assert_eq!(Some(67), o);
19751975
/// ```
1976+
#[inline]
19761977
fn from(val: T) -> Option<T> {
19771978
Some(val)
19781979
}

0 commit comments

Comments
 (0)