We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
CloneToUninit
ByteStr
1 parent 022e7c0 commit 865471fCopy full SHA for 865471f
library/core/src/clone.rs
@@ -311,6 +311,16 @@ unsafe impl CloneToUninit for crate::ffi::CStr {
311
}
312
313
314
+#[unstable(feature = "bstr", issue = "134915")]
315
+unsafe impl CloneToUninit for crate::bstr::ByteStr {
316
+ #[inline]
317
+ #[cfg_attr(debug_assertions, track_caller)]
318
+ unsafe fn clone_to_uninit(&self, dst: *mut u8) {
319
+ // SAFETY: ByteStr is a `#[repr(transparent)]` wrapper around `[u8]`
320
+ unsafe { self.as_bytes().clone_to_uninit(dst) }
321
+ }
322
+}
323
+
324
/// Implementations of `Clone` for primitive types.
325
///
326
/// Implementations that cannot be described in Rust
0 commit comments