Fix some warnings

This commit is contained in:
Shunsuke Shibayama 2022-08-13 07:22:00 +09:00
parent 6726d93f65
commit 2bba7f741c
14 changed files with 64 additions and 35 deletions

View file

@ -13,9 +13,9 @@ pub fn which_python() -> String {
.expect("python not found");
let res = String::from_utf8(out.stdout)
.unwrap()
.replace("\n", "")
.replace("\r", "");
if res == "" {
.replace('\n', "")
.replace('\r', "");
if res.is_empty() {
panic!("python not found");
}
res