lib: use write! to send image percentage

Use write! instead of writeln! to remove extra linewraps.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
Dmitry Baryshkov
2024-05-02 02:01:19 +03:00
committed by Konrad Dybcio
parent f49bcf417f
commit e901247cd2

View File

@@ -96,7 +96,7 @@ pub fn send_image(write_sink: &mut impl Write, buf: &[u8]) {
let percent_done = 100 * bytes_sent / buf.len();
if percent_done != last_percent_done {
writeln!(stdout(), " Sending image: {}%\r", percent_done).unwrap();
write!(stdout(), " Sending image: {}%\r", percent_done).unwrap();
}
send_msg(write_sink, Sk8brdMsgs::MsgFastbootDownload, chunk);