@@ -30,20 +30,18 @@ macro_rules! csi {
30
30
/// use std::io::{Write, stdout};
31
31
/// use crossterm::{queue, style::Print};
32
32
///
33
- /// fn main() {
34
- /// let mut stdout = stdout();
33
+ /// let mut stdout = stdout();
35
34
///
36
- /// // `Print` will executed executed when `flush` is called.
37
- /// queue!(stdout, Print("foo".to_string()));
35
+ /// // `Print` will executed executed when `flush` is called.
36
+ /// queue!(stdout, Print("foo".to_string()));
38
37
///
39
- /// // some other code (no execution happening here) ...
38
+ /// // some other code (no execution happening here) ...
40
39
///
41
- /// // when calling `flush` on `stdout`, all commands will be written to the stdout and therefore executed.
42
- /// stdout.flush();
40
+ /// // when calling `flush` on `stdout`, all commands will be written to the stdout and therefore executed.
41
+ /// stdout.flush();
43
42
///
44
- /// // ==== Output ====
45
- /// // foo
46
- /// }
43
+ /// // ==== Output ====
44
+ /// // foo
47
45
/// ```
48
46
///
49
47
/// Have a look over at the [Command API](./#command-api) for more details.
@@ -86,17 +84,15 @@ macro_rules! queue {
86
84
/// use std::io::{Write, stdout};
87
85
/// use crossterm::{execute, style::Print};
88
86
///
89
- /// fn main() {
90
- /// // will be executed directly
91
- /// execute!(stdout(), Print("sum:\n".to_string()));
87
+ /// // will be executed directly
88
+ /// execute!(stdout(), Print("sum:\n".to_string()));
92
89
///
93
- /// // will be executed directly
94
- /// execute!(stdout(), Print("1 + 1= ".to_string()), Print((1+1).to_string()));
90
+ /// // will be executed directly
91
+ /// execute!(stdout(), Print("1 + 1= ".to_string()), Print((1+1).to_string()));
95
92
///
96
- /// // ==== Output ====
97
- /// // sum:
98
- /// // 1 + 1 = 2
99
- /// }
93
+ /// // ==== Output ====
94
+ /// // sum:
95
+ /// // 1 + 1 = 2
100
96
/// ```
101
97
///
102
98
/// Have a look over at the [Command API](./#command-api) for more details.
0 commit comments