diff options
| author | Tianhao Wang <wth@riseup.net> | 2024-02-01 15:08:30 +0100 |
|---|---|---|
| committer | Tianhao Wang <shrik3@mailbox.org> | 2024-06-11 15:13:36 +0200 |
| commit | 753955dbb4e6c77b9c56c659fe766a867c575023 (patch) | |
| tree | fd8e8a443290eb028ab6d8540eb192b3fa854701 /src/io.rs | |
| parent | 7194cceeec9721e7c61dde78e5c1da42e16884e2 (diff) | |
pub(crate) use for println macros
The println! and print! macros are defined in submodule "io",
I have to add this trick to make it work across the crate.
Maybe there is a better way...
Diffstat (limited to 'src/io.rs')
| -rw-r--r-- | src/io.rs | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2,7 +2,6 @@ use crate::machine::cgascr::CGAScreen; use core::fmt; use lazy_static::lazy_static; use spin::Mutex; - // TODO I want my own locking primitive for practice, instead of stock spin lock lazy_static! { // TODO perhaps remove the 'a lifetime from the struc defs @@ -13,12 +12,14 @@ lazy_static! { macro_rules! print { ($($arg:tt)*) => ($crate::io::_print(format_args!($($arg)*))); } +pub(crate) use print; #[macro_export] macro_rules! println { () => ($crate::print!("\n")); ($($arg:tt)*) => (print!("{}\n", format_args!($($arg)*))); } +pub(crate) use println; pub fn _print(args: fmt::Arguments) { use core::fmt::Write; |
