@@ -52,13 +52,15 @@ impl Module for Julia {
52
52
// julia startup
53
53
print_banner ( ) . await ;
54
54
csleep ( rng. gen_range ( 50 ..150 ) ) . await ;
55
- print_julia_prompt ( false ) . await ;
55
+ newline ( ) . await ;
56
+ print_julia_prompt ( ) . await ;
56
57
57
58
// wait user input
58
59
csleep ( rng. gen_range ( 500 ..2500 ) ) . await ;
59
60
60
61
// enter pkg mode
61
- print_pkg_prompt ( project, true ) . await ;
62
+ erase_line ( ) . await ;
63
+ print_pkg_prompt ( project) . await ;
62
64
63
65
// wait user input
64
66
csleep ( rng. gen_range ( 500 ..1500 ) ) . await ;
@@ -102,13 +104,15 @@ impl Module for Julia {
102
104
// wait cleanup
103
105
csleep ( rng. gen_range ( 50 ..250 ) ) . await ;
104
106
105
- print_pkg_prompt ( project, false ) . await ;
107
+ newline ( ) . await ;
108
+ print_pkg_prompt ( project) . await ;
106
109
107
110
// wait user input
108
111
csleep ( rng. gen_range ( 500 ..5000 ) ) . await ;
109
112
110
113
// exit pkg mode
111
- print_julia_prompt ( true ) . await ;
114
+ erase_line ( ) . await ;
115
+ print_julia_prompt ( ) . await ;
112
116
113
117
// wait user input
114
118
csleep ( rng. gen_range ( 1000 ..7000 ) ) . await ;
@@ -145,21 +149,11 @@ async fn print_banner() {
145
149
. await ;
146
150
}
147
151
148
- async fn print_julia_prompt ( overwrite : bool ) {
149
- if overwrite {
150
- erase_line ( ) . await ;
151
- } else {
152
- newline ( ) . await ;
153
- }
152
+ async fn print_julia_prompt ( ) {
154
153
print ( format ! ( "{} " , Paint :: green( "julia>" ) . bold( ) ) ) . await ;
155
154
}
156
155
157
- async fn print_pkg_prompt ( project : & str , overwrite : bool ) {
158
- if overwrite {
159
- erase_line ( ) . await ;
160
- } else {
161
- newline ( ) . await ;
162
- }
156
+ async fn print_pkg_prompt ( project : & str ) {
163
157
print ( format ! (
164
158
"{} " ,
165
159
Paint :: blue( format!( "({}) pkg>" , project) ) . bold( )
0 commit comments