1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-02 03:12:25 +01:00

Fix lessopen feature

RawOsString API changed in os_str_bytes 7.0.0 and bat no longer builds
with the lessopen feature because:

- ::from_string() is deprecated and says to use new().
  The documentation says that new(), like from_string() no longer
  needs to copy the string.

- ::assert_from_raw_vec() is no longer merely deprecated and now
  requires selecting the "conversions" feature of os_str_bytes.

Replaces PR#2938
This commit is contained in:
Matt Helsley
2024-10-03 16:08:07 -07:00
parent 61c9f312c9
commit 3e5f4266ce
2 changed files with 2 additions and 2 deletions

View File

@@ -112,7 +112,7 @@ impl LessOpenPreprocessor {
}
(
RawOsString::from_string(lessopen_stdout),
RawOsString::new(lessopen_stdout),
path_str.to_string(),
OpenedInputKind::OrdinaryFile(path.to_path_buf()),
)