mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 12:13:43 +00:00
Inline CStr::from_ptr
This commit is contained in:
parent
5e02151318
commit
86c309c27f
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user