9ccf798fff
impl From<TryReserveError> for io::Error There's an obvious mapping between these two errors, and it makes I/O code less noisy. I've chosen to use simple `ErrorKind::OutOfMemory` `io::Error`, without keeping `TryReserveError` for the `source()`, because: * It matches current uses in libstd, * `ErrorData::Custom` allocates, which is a risky proposition for handling OOM errors specifically. * Currently `TryReserveError` has no public fields/methods, so it's usefulness is limited. How allocators should report errors, especially custom and verbose ones is still an open question. Just in case I've added note in the doccomment that this may change. The compiler forced me to declare stability of this impl. I think this implementation is simple enough that it doesn't need full-blown stabilization period, and I've marked it for the next release, but of course I can adjust the attribute if needed. |
||
---|---|---|
.. | ||
alloc | ||
backtrace@6145fe6bac | ||
core | ||
panic_abort | ||
panic_unwind | ||
portable-simd | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@56087ea170 | ||
sysroot | ||
test | ||
unwind |