Skip to content

Commit 3865e00

Browse files
committed
read to String directly without extra conversion
Signed-off-by: onur-ozkan <[email protected]>
1 parent 391914e commit 3865e00

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/bootstrap/src/core/download.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,7 @@ impl Config {
197197
if !path_is_dylib(fname) {
198198
// Finally, set the correct .interp for binaries
199199
let dynamic_linker_path = nix_deps_dir.join("nix-support/dynamic-linker");
200-
// FIXME: can we support utf8 here? `args` doesn't accept Vec<u8>, only OsString ...
201-
let dynamic_linker = t!(String::from_utf8(t!(fs::read(dynamic_linker_path))));
200+
let dynamic_linker = t!(fs::read_to_string(dynamic_linker_path));
202201
patchelf.args(["--set-interpreter", dynamic_linker.trim_end()]);
203202
}
204203

0 commit comments

Comments
 (0)