Skip to content

Commit

Permalink
Make print macro case order consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
mvirkkunen committed Jun 19, 2020
1 parent 8a6eeed commit 582dd99
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions rtt-target/src/print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,6 @@ macro_rules! rprint {
/// range from 0 to 15.
#[macro_export]
macro_rules! rprintln {
() => {
$crate::print_impl::write_str(0, "\n");
};
($fmt:expr) => {
$crate::print_impl::write_str(0, concat!($fmt, "\n"));
};
($fmt:expr, $($arg:tt)*) => {
$crate::print_impl::write_fmt(0, format_args!(concat!($fmt, "\n"), $($arg)*));
};
(=> $terminal:expr) => {
$crate::print_impl::write_str($terminal, "\n");
};
Expand All @@ -166,6 +157,15 @@ macro_rules! rprintln {
(=> $terminal:expr, $fmt:expr, $($arg:tt)*) => {
$crate::print_impl::write_fmt($terminal, format_args!(concat!($fmt, "\n"), $($arg)*));
};
() => {
$crate::print_impl::write_str(0, "\n");
};
($fmt:expr) => {
$crate::print_impl::write_str(0, concat!($fmt, "\n"));
};
($fmt:expr, $($arg:tt)*) => {
$crate::print_impl::write_fmt(0, format_args!(concat!($fmt, "\n"), $($arg)*));
};
}

/// Initializes RTT with a single up channel and sets it as the print channel for the printing
Expand Down

0 comments on commit 582dd99

Please sign in to comment.