Skip to content

Commit 95ca4a8

Browse files
committed
init modules cstring16
1 parent 0018d87 commit 95ca4a8

File tree

6 files changed

+394
-7
lines changed

6 files changed

+394
-7
lines changed

src/polyfill.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use {alloc::vec::Vec, core::mem::ManuallyDrop};
88
/// Polyfill for the unstable `MaybeUninit::slice_assume_init_ref` function.
99
///
1010
/// See <https://github.com/rust-lang/rust/issues/63569>.
11+
#[allow(clippy::missing_safety_doc)]
1112
pub const unsafe fn maybe_uninit_slice_assume_init_ref<T>(s: &[MaybeUninit<T>]) -> &[T] {
1213
unsafe { &*(s as *const [MaybeUninit<T>] as *const [T]) }
1314
}

src/types/cstr16.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
use crate::polyfill::maybe_uninit_slice_assume_init_ref;
22
use crate::types::chars::{Char16, NUL_16};
33
use crate::types::unaligned_slice::UnalignedSlice;
4+
#[cfg(feature = "alloc")]
5+
use crate::types::CString16;
46
use crate::types::{EqStrUntilNul, FromSliceWithNulError, FromStrWithBufError};
57
use core::borrow::Borrow;
68
use core::fmt::{Display, Formatter};

src/types/cstr8.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//! Rusty-types to work with UCS-2 strings and for convenient interoperability
2-
//! with Rust string literals (`&str`) and Rust strings (`String`).
3-
41
use crate::types::chars::{Char8, NUL_8};
52
use crate::types::{EqStrUntilNul, FromSliceWithNulError};
63
use core::borrow::Borrow;

0 commit comments

Comments
 (0)