-
Notifications
You must be signed in to change notification settings - Fork 173
Closed
Description
In the hprint!
macros:
cortex-m/cortex-m-semihosting/src/macros.rs
Lines 36 to 44 in f2fc7d3
#[macro_export] | |
macro_rules! hprint { | |
($s:expr) => { | |
$crate::export::hstdout_str($s) | |
}; | |
($($tt:tt)*) => { | |
$crate::export::hstdout_fmt(format_args!($($tt)*)) | |
}; | |
} |
They do not print format strings with no arguments (e.g., hprint!("{address}")
is sugar for hprint!("{}", address)
, which is a deviation from the stdlib print!
macros using format_args!
.
If it's acceptable performance-wise, I can submit a PR to use e.g. hstdout_fmt
in this case instead of hstdout_str
, otherwise I can document this deviation.
Metadata
Metadata
Assignees
Labels
No labels