Skip to content

Commit ede8886

Browse files
committed
Use to_str instead of to_string_lossy
1 parent 0372f89 commit ede8886

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ impl Build {
135135
let compiler_path =
136136
which::which(compiler_path).expect(&format!("cannot find {compiler_path}"));
137137
let bindir = compiler_path.parent().unwrap();
138-
let compiler_path = compiler_path.to_string_lossy();
138+
let compiler_path = compiler_path.to_str().unwrap();
139139
let compiler_args = compiler.cflags_env();
140-
let compiler_args = compiler_args.to_string_lossy();
140+
let compiler_args = compiler_args.to_str().unwrap();
141141
if env::var_os("STATIC_CC").is_none() {
142142
make.env("STATIC_CC", format!("{compiler_path} {compiler_args}"));
143143
}

0 commit comments

Comments
 (0)