aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bors[bot] <bors[bot]@users.noreply.github.com> 2018-09-06 19:30:25 +0000
committerGravatar bors[bot] <bors[bot]@users.noreply.github.com> 2018-09-06 19:30:25 +0000
commitf5ce9839664bd5723cc0f7f934e9c0a38de25c41 (patch)
tree31e1da4b405da85f6c51a6d1581b486c0c6f5d5e /src
parenta2da38b0dced156c6fa78fb71d1fea2acb908c4d (diff)
parentfa1797b21c93c85b453fb90b0060a2cdf6137cb9 (diff)
downloadcortex-m-f5ce9839664bd5723cc0f7f934e9c0a38de25c41.tar.gz
cortex-m-f5ce9839664bd5723cc0f7f934e9c0a38de25c41.tar.zst
cortex-m-f5ce9839664bd5723cc0f7f934e9c0a38de25c41.zip
Merge #115
115: make `iprintln!` not depend on `iprint!` r=therealprof a=japaric the preferred way to import macros in Rust 2018 is via `use`. If you import `iprintln` and try to use you'll get an error if the `iprint` macro has not been imported as well. This commit makes `iprintln` work w/o having to import `iprint` as well. r? @rust-embedded/cortex-m (anyone) Co-authored-by: Jorge Aparicio <jorge@japaric.io>
Diffstat (limited to 'src')
-rw-r--r--src/macros.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/macros.rs b/src/macros.rs
index e41cdc5..813552f 100644
--- a/src/macros.rs
+++ b/src/macros.rs
@@ -13,13 +13,13 @@ macro_rules! iprint {
#[macro_export]
macro_rules! iprintln {
($channel:expr) => {
- iprint!($channel, "\n");
+ $crate::itm::write_str($channel, "\n");
};
($channel:expr, $fmt:expr) => {
- iprint!($channel, concat!($fmt, "\n"));
+ $crate::itm::write_str($channel, concat!($fmt, "\n"));
};
($channel:expr, $fmt:expr, $($arg:tt)*) => {
- iprint!($channel, concat!($fmt, "\n"), $($arg)*);
+ $crate::itm::write_fmt($channel, format_args!(concat!($fmt, "\n"), $($arg)*));
};
}