Changed String::from_utf8 to String::from_utf8_lossy

This commit is contained in:
Shunsuke Shibayama 2022-08-17 23:19:16 +09:00
parent 6921189a95
commit 667b905e36
3 changed files with 3 additions and 4 deletions

View file

@ -87,7 +87,7 @@ pub fn eval_pyc<S: Into<String>>(file: S) -> String {
.expect("cannot execute python")
};
let out = out.wait_with_output().expect("python doesn't work");
String::from_utf8(out.stdout).expect("failed to decode python output")
String::from_utf8_lossy(&out.stdout).to_string()
}
pub fn exec_py(code: &str) {