encoding_rs::mem::convert_latin1_to_utf8 and similar functions panic instead of returning an error when the passed slice to write into is too small.
This immediately struck my as unidiomatic in Rust and effectively means I will have to use encoding_rs::mem::convert_latin1_to_utf8_partial instead and wrap it with my own error for ergonomic usage.
Is this behaviour required for abiding by encoding standard or was this decision made for a different reason? Sorry for my ignorance.
encoding_rs::mem::convert_latin1_to_utf8
and similar functions panic instead of returning an error when the passed slice to write into is too small.This immediately struck my as unidiomatic in Rust and effectively means I will have to use
encoding_rs::mem::convert_latin1_to_utf8_partial
instead and wrap it with my own error for ergonomic usage.Is this behaviour required for abiding by encoding standard or was this decision made for a different reason? Sorry for my ignorance.