As std::os::unix is obviously not available on Windows, resort to the
winpipe crate, which implements a very similar API for named pipes.
Apart from simple changes to imports, we need to jump through a few
hoops because the std::io::{Read, Write} impls are on &mut for
winpipe, thus yielding different mutability requirements on Unix vs.
Windows.
We resort to cloning, but as this fallible, swallow the added complexity of a platform-dependent implementation to not risk panics on Unix.
As std::os::unix is obviously not available on Windows, resort to the
winpipe crate, which implements a very similar API for named pipes.
Apart from simple changes to imports, we need to jump through a few
hoops because the std::io::{Read, Write} impls are on &mut for
winpipe, thus yielding different mutability requirements on Unix vs.
Windows.
We resort to cloning, but as this fallible, swallow the added complexity of a platform-dependent implementation to not risk panics on Unix.
Review
Rebased
Changes:
- Missed
cargo fmt