Skip to content

Commit f4be38e

Browse files
committed
Try to have new tests support gix-command MSRV of 1.70
1 parent cee29e7 commit f4be38e

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gix-command/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ shell-words = "1.0"
2424

2525
[dev-dependencies]
2626
gix-testtools = { path = "../tests/tools" }
27+
os_str_bytes = { version = "^6.6.1", default-features = false, features = ["conversions"] }

gix-command/tests/command.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,12 +565,14 @@ mod spawn {
565565
use std::path::Path;
566566

567567
use gix_testtools::bstr::{BString, ByteSlice, ByteVec};
568+
use os_str_bytes::OsStringBytes;
568569

569570
fn script_path(filename: impl AsRef<Path>) -> crate::Result<OsString> {
571+
// TODO(msrv): At 1.74, change into_raw_vec to into_encoded_bytes and don't depend on os_str_bytes.
570572
let native_path: BString = gix_testtools::scripted_fixture_read_only("scripts.sh")?
571573
.join(filename)
572574
.into_os_string()
573-
.into_encoded_bytes()
575+
.into_raw_vec()
574576
.into();
575577
let unix_path = gix_path::to_unix_separators_on_windows(native_path)
576578
.to_os_str()?
@@ -599,7 +601,8 @@ mod spawn {
599601
}
600602

601603
fn concatenate(prefix: OsString, suffix: &str) -> BString {
602-
let mut buffer: BString = prefix.into_encoded_bytes().into();
604+
// TODO(msrv): At 1.74, change into_raw_vec to into_encoded_bytes and don't depend on os_str_bytes.
605+
let mut buffer: BString = prefix.into_raw_vec().into();
603606
buffer.push_str(suffix);
604607
buffer
605608
}

0 commit comments

Comments
 (0)