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 70c35f7 commit 5a5cbddCopy full SHA for 5a5cbdd
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