Skip to content

Commit b3f5418

Browse files
authored
Fix minor clippy lint (#836)
1 parent c20d18f commit b3f5418

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

kernel/app_io/src/lib.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)