mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-10-02 14:54:30 +00:00
Reference core
library instead in examples
This commit is contained in:
parent
eb085c5464
commit
424f5ab39c
@ -28,8 +28,8 @@ impl<const N: usize> CString<N> {
|
|||||||
/// Creates a new C-compatible string with a terminating nul byte.
|
/// Creates a new C-compatible string with a terminating nul byte.
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
|
/// use core::ffi::CStr;
|
||||||
/// use heapless::CString;
|
/// use heapless::CString;
|
||||||
/// use std::ffi::CStr;
|
|
||||||
///
|
///
|
||||||
/// // Fixed-size CString that can store up to 10 elements
|
/// // Fixed-size CString that can store up to 10 elements
|
||||||
/// // (counting the nul terminator)
|
/// // (counting the nul terminator)
|
||||||
@ -107,8 +107,8 @@ impl<const N: usize> CString<N> {
|
|||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
|
/// use core::ffi::{c_char, CStr};
|
||||||
/// use heapless::CString;
|
/// use heapless::CString;
|
||||||
/// use std::ffi::{c_char, CStr};
|
|
||||||
///
|
///
|
||||||
/// const HELLO_PTR: *const c_char = {
|
/// const HELLO_PTR: *const c_char = {
|
||||||
/// const BYTES: &[u8] = b"Hello, world!\0";
|
/// const BYTES: &[u8] = b"Hello, world!\0";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user