From 73fb318feace17f99228d13de1662db2dbf93f70 Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Wed, 28 Sep 2022 17:16:38 -0300 Subject: [PATCH] Tentatively #[inline] Option::from Probably not gonna have much of an impact because into can't be inlined. --- library/core/src/option.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 4a93df4591b7a..77a10c503a3c4 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -1973,6 +1973,7 @@ impl const From for Option { /// /// assert_eq!(Some(67), o); /// ``` + #[inline] fn from(val: T) -> Option { Some(val) }