8000 move CStr8, CStr16, and CString16 from uefi to ucs2 by phip1611 · Pull Request #23 · rust-osdev/ucs2-rs · GitHub
[go: up one dir, main page]

Skip to content

move CStr8, CStr16, and CString16 from uefi to ucs2 #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
init modules cstring16
  • Loading branch information
phip1611 committed Jul 30, 2024
commit 95ca4a8174db5005ea60e4dea32c060c1299576d
1 change: 1 addition & 0 deletions src/polyfill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use {alloc::vec::Vec, core::mem::ManuallyDrop};
/// Polyfill for the unstable `MaybeUninit::slice_assume_init_ref` function.
///
/// See <https://github.com/rust-lang/rust/issues/63569>.
#[allow(clippy::missing_safety_doc)]
pub const unsafe fn maybe_uninit_slice_assume_init_ref<T>(s: &[MaybeUninit<T>]) -> &[T] {
unsafe { &*(s as *const [MaybeUninit<T>] as *const [T]) }
}
Expand Down
2 changes: 2 additions & 0 deletions src/types/cstr16.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use crate::polyfill::maybe_uninit_slice_assume_init_ref;
use crate::types::chars::{Char16, NUL_16};
use crate::types::unaligned_slice::UnalignedSlice;
#[cfg(feature = "alloc")]
use crate::types::CString16;
use crate::types::{EqStrUntilNul, FromSliceWithNulError, FromStrWithBufError};
use core::borrow::Borrow;
use core::fmt::{Display, Formatter};
Expand Down
3 changes: 0 additions & 3 deletions src/types/cstr8.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//! Rusty-types to work with UCS-2 strings and for convenient interoperability
//! with Rust string literals (`&str`) and Rust strings (`String`).

use crate::types::chars::{Char8, NUL_8};
use crate::types::{EqStrUntilNul, FromSliceWithNulError};
use core::borrow::Borrow;
Expand Down
Loading
Loading
0