1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

Fix base64 due to from_utf8 and replace changes

These two changes were made in rust's std lib:
    1. `str::replace` was a method of str, now it's a function.
    2. `from_utf8` now wraps its return value in Option.
This commit is contained in:
Jordy Dickinson 2014-01-24 12:29:00 -05:00
parent 2eb243cb58
commit 492b35f629

View file

@ -82,9 +82,9 @@ fn main() {
}
fn decode(input: &mut Reader, ignore_garbage: bool) {
let mut to_decode = str::from_utf8_owned(input.read_to_end());
let mut to_decode = str::from_utf8_owned(input.read_to_end()).unwrap();
to_decode = to_decode.replace("\n", "");
to_decode = str::replace(to_decode, "\n", "");
if ignore_garbage {
let standard_chars =