From 86c309c27f4632c19a518d6555add44145c2ddac Mon Sep 17 00:00:00 2001 From: Konrad Borowski Date: Mon, 18 Oct 2021 11:38:51 +0200 Subject: [PATCH] Inline CStr::from_ptr --- library/std/src/ffi/c_str.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/std/src/ffi/c_str.rs b/library/std/src/ffi/c_str.rs index 6827d3a8d24..52ee2e801ff 100644 --- a/library/std/src/ffi/c_str.rs +++ b/library/std/src/ffi/c_str.rs @@ -1175,6 +1175,7 @@ impl CStr { /// } /// # } /// ``` + #[inline] #[must_use] #[stable(feature = "rust1", since = "1.0.0")] pub unsafe fn from_ptr<'a>(ptr: *const c_char) -> &'a CStr {