]> git.lizzy.rs Git - rust.git/commit
Add `as_bytes()` for `FromUtf8Error`.
authorEvgeny Safronov <division494@gmail.com>
Mon, 6 Mar 2017 06:03:31 +0000 (09:03 +0300)
committerEvgeny Safronov <division494@gmail.com>
Fri, 14 Apr 2017 06:46:03 +0000 (09:46 +0300)
commit5a09d7c3de6cc5daf1b9925a8e7d19edf44c27a7
tree730e929fb44e5cd1520334b31762cbff6340c1fb
parent4f32e0dfb287c2b3d0c48cb3b8090b3902960084
Add `as_bytes()` for `FromUtf8Error`.

This change allows to obtain an underlying invalid UTF-8 bytes
without `FromUtf8Error` destruction. Such method may be useful
for example in a library that attempts to save both valid and
invalid UTF-8 strings in some struct and to be able to provide
immutable access to it without destruction.
src/libcollections/string.rs