File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -209,18 +209,15 @@ pub fn print_to_stdout_args(fmt_args: core::fmt::Arguments) {
209209
210210 // Obtains the correct stdout stream and push the output bytes.
211211 let locked_streams = shared_maps:: lock_stream_map ( ) ;
212- match locked_streams. get ( & task_id) {
213- Some ( queues) => {
214- if queues
212+ if let Some ( queues) = locked_streams. get ( & task_id) {
213+ if queues
215214 . stdout
216215 . write_all ( format ! ( "{fmt_args}" ) . as_bytes ( ) )
217216 . is_err ( )
218217 {
219218 let _ = logger:: write_str ( "\x1b [31m [E] failed to write to stdout \x1b [0m\n " ) ;
220219 }
221- }
222- None => {
223- // let _ = logger::write_str("\x1b[31m [E] error in print!/println! macro: no stdout queue for current task \x1b[0m\n");
224- }
220+ } else {
221+ // let _ = logger::write_str("\x1b[31m [E] error in print!/println! macro: no stdout queue for current task \x1b[0m\n");
225222 } ;
226223}
You can’t perform that action at this time.
0 commit comments