Closed schodet closed 7 years ago
I think we should also provide a fn write_all(&self, bytes: &[u8]) -> Result<(), ()> method on Stdout and Stderr for convenience.
Even if std is not built?
Even if std is not built?
We can provide write_all
as an inherent method (i.e. impl Stdout { fn write_all(&mut self, ..) }
). No need to use a trait (io::Write
is not available in core anyway).
Here is a proof of concept made by following review in #7.
If this is ok, I think the next step is to remove all write functions and print macros and use the regular write! macro.
Tested with black magic probe.