How do write! and writeln! macros handle EINTR? And partial writes?

Do they work similarly to io::Write::write_all()?

If not, am I supposed to use wtr.write_all(format!("{}", var).as_bytes()) instead?

The write! macros call Write::write_fmt, which uses Write::write_all.

So this is what I was looking for, I guess: https://github.com/rust-lang/rust/blob/9e92106d457abd14f82adc29e7f2496861e07916/src/libstd/io/mod.rs#L1486-L1519

I found this - https://github.com/rust-lang/rust/blob/9e92106d457abd14f82adc29e7f2496861e07916/src/libcore/fmt/mod.rs#L191-L194 - at first and that threw me off.

Thanks!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.