Skip to content

Commit b1542c7

Browse files
committed
Simplify the code, using into_encoded_bytes
It used `as_encoded_bytes` before, which required more other steps. Both functions require Rust 1.74, so the MSRVC for `gix-command`, whih is 1.70, will not support them. That remains to be resolved.
1 parent bb36266 commit b1542c7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

gix-command/tests/command.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -567,12 +567,11 @@ mod spawn {
567567
use gix_testtools::bstr::{BString, ByteSlice, ByteVec};
568568

569569
fn script_path(filename: impl AsRef<Path>) -> crate::Result<OsString> {
570-
let native_path = gix_testtools::scripted_fixture_read_only("scripts.sh")?
570+
let native_path: BString = gix_testtools::scripted_fixture_read_only("scripts.sh")?
571571
.join(filename)
572-
.as_os_str()
573-
.as_encoded_bytes()
574-
.as_bstr()
575-
.to_owned();
572+
.into_os_string()
573+
.into_encoded_bytes()
574+
.into();
576575
let unix_path = gix_path::to_unix_separators_on_windows(native_path)
577576
.to_os_str()?
578577
.to_owned();

0 commit comments

Comments
 (0)