You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write for Empty was only added (merged) last month and is still in nightly: rust-lang/rust#98154, as such we might want to wait until it's in stable to possibly implement this (just so we know it's here to stay and don't do unnecessary work).
There was also a PR to soft-deprecate Sink after this functionality was added but it doesn't seem it will ever be: rust-lang/rust#114384 (comment)
What it does
If
Empty
is constructed yet its implementations ofRead
/BufRead
are never required, we should suggestSink
instead which conveys this purpose better.We also need to make sure some access does not require a trait outside of
std
thatSink
doesn't implement.Advantage
Drawbacks
Example
Could be written as:
The text was updated successfully, but these errors were encountered: