human_errors/from/
utf8.rs

1use crate::{Error, wrap_user};
2use std::string::FromUtf8Error;
3
4impl From<FromUtf8Error> for Error {
5    fn from(err: FromUtf8Error) -> Self {
6        wrap_user(
7            err,
8            "We could not parse the UTF-8 content you provided.",
9            &["Make sure that you are providing us with content which is valid UTF-8."],
10        )
11    }
12}