File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 1
- /// Print formatted text to our console .
1
+ /// Prints to the standard output .
2
2
///
3
- /// From http://blog.phil-opp.com/rust-os/printing-to-screen.html, but tweaked
4
- /// for HermitCore.
3
+ /// Adapted from [`std::print`].
4
+ ///
5
+ /// [`std::print`]: https://doc.rust-lang.org/stable/std/macro.print.html
5
6
#[ macro_export]
6
7
macro_rules! print {
7
8
( $( $arg: tt) * ) => { {
8
9
$crate:: _print( :: core:: format_args!( $( $arg) * ) ) ;
9
10
} } ;
10
11
}
11
12
12
- /// Print formatted text to our console, followed by a newline.
13
+ /// Prints to the standard output, with a newline.
14
+ ///
15
+ /// Adapted from [`std::println`].
16
+ ///
17
+ /// [`std::println`]: https://doc.rust-lang.org/stable/std/macro.println.html
13
18
#[ macro_export]
14
19
macro_rules! println {
15
20
( ) => {
16
21
$crate:: print!( "\n " )
17
22
} ;
18
23
( $( $arg: tt) * ) => { {
19
- print !( "{}\n " , :: core :: format_args!( $( $arg) * ) )
24
+ $crate :: _print ( :: core :: format_args !( "{}\n " , format_args!( $( $arg) * ) ) ) ;
20
25
} } ;
21
26
}
22
27
You can’t perform that action at this time.
0 commit comments