diff options
| author | Elichai Turkel <elichai.turkel@gmail.com> | 2021-05-26 13:12:54 +0300 |
|---|---|---|
| committer | Elichai Turkel <elichai.turkel@gmail.com> | 2021-05-26 13:12:54 +0300 |
| commit | 45099e6cf6d44bb9cefdda42823794fab2df2703 (patch) | |
| tree | 3315e9d62067cb132e3a4c759d1f82e107574919 | |
| parent | cdbe2888979bb8797b05f0d58a6f6e60753983d2 (diff) | |
| download | rust-45099e6cf6d44bb9cefdda42823794fab2df2703.tar.gz rust-45099e6cf6d44bb9cefdda42823794fab2df2703.zip | |
Add inline attr to private CString::into_inner
| -rw-r--r-- | library/std/src/ffi/c_str.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/ffi/c_str.rs b/library/std/src/ffi/c_str.rs index 2a4ef553be3..be7e099b73a 100644 --- a/library/std/src/ffi/c_str.rs +++ b/library/std/src/ffi/c_str.rs @@ -672,6 +672,7 @@ impl CString { } /// Bypass "move out of struct which implements [`Drop`] trait" restriction. + #[inline] fn into_inner(self) -> Box<[u8]> { // Rationale: `mem::forget(self)` invalidates the previous call to `ptr::read(&self.inner)` // so we use `ManuallyDrop` to ensure `self` is not dropped. |
