Skip to content

Commit f4d8e27

Browse files
committed
zephyr: printk: Remove dependency on alloc
This had an `extern crate alloc` for a link in the docs, but there is no actual dependency on this. Replace this with a resolved link to the standard documentation for formatting. Signed-off-by: David Brown <[email protected]>
1 parent ae9ab7a commit f4d8e27

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

zephyr/src/printk.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
//!
66
//! This uses the `k_str_out` syscall, which is part of printk to output to the console.
77
8-
// Needed by the docs, even though we don't allocate.
9-
extern crate alloc;
10-
118
use core::fmt::{
129
Arguments,
1310
Result,
@@ -17,13 +14,13 @@ use core::fmt::{
1714

1815
/// Print to Zephyr's console, without a newline.
1916
///
20-
/// This macro uses the same syntax as std's [`format!`], but writes to the Zephyr console instead.
17+
/// This macro uses the same syntax as std's
18+
/// [`format!`](https://doc.rust-lang.org/stable/std/fmt/index.html), but writes to the Zephyr
19+
/// console instead.
2120
///
2221
/// if `CONFIG_PRINTK_SYNC` is enabled, this locks during printing. However, to avoid allocation,
2322
/// and due to private accessors in the Zephyr printk implementation, the lock is only over groups
2423
/// of a small buffer size. This buffer must be kept fairly small, as it resides on the stack.
25-
///
26-
/// [`format!`]: alloc::format
2724
#[macro_export]
2825
macro_rules! printk {
2926
($($arg:tt)*) => {{

0 commit comments

Comments
 (0)