Closed izik1 closed 5 years ago
Breaking changes:
Error::{InvalidData, BufferUnderflow}
Possible concerns:
#[deny(unsafe_code)]
core::hint::unreachable_unchecked
unsafe
Considered alternatives:
unreachable!
unreachable_unchecked
Rationale:
closes #2
Thanks for the PR! Indeed it seems that it's impossible for Rust code to pass us invalid UTF-8 strings (or at the very least, it's not our responsability to handle).
Breaking changes:
Error::{InvalidData, BufferUnderflow}
no longer exist.Possible concerns:
#[deny(unsafe_code)]
due to usingcore::hint::unreachable_unchecked
.unsafe
might need changing.Considered alternatives:
unreachable!
instead ofunreachable_unchecked
.unsafe
, but it would compile panics that are still provably unreachable.Rationale:
closes #2