mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-19 03:58:18 +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:
parent
61c9f312c9
commit
3e5f4266ce
@ -33,7 +33,7 @@ minimal-application = [
|
||||
]
|
||||
git = ["git2"] # Support indicating git modifications
|
||||
paging = ["shell-words", "grep-cli"] # Support applying a pager on the output
|
||||
lessopen = ["run_script", "os_str_bytes"] # Support $LESSOPEN preprocessor
|
||||
lessopen = ["run_script", "os_str_bytes/conversions"] # Support $LESSOPEN preprocessor
|
||||
build-assets = ["syntect/yaml-load", "syntect/plist-load", "regex", "walkdir"]
|
||||
|
||||
# You need to use one of these if you depend on bat as a library:
|
||||
|
@ -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()),
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user