mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +00:00
Fix unused code warning on cannot-be-WSL platforms
No need to use cfg_attr and have to worry about syncing the preconditions for the cfg_attr with the preconditions for where `slice_contains_slice()` is used in the codebase, just mark it as `allow(unused)` with a comment.
This commit is contained in:
parent
a533d836dd
commit
a138d74688
1 changed files with 2 additions and 0 deletions
|
@ -1629,6 +1629,8 @@ pub fn restore_term_foreground_process_group_for_exit() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
// This function is unused in some configurations/on some platforms
|
||||||
fn slice_contains_slice<T: Eq>(a: &[T], b: &[T]) -> bool {
|
fn slice_contains_slice<T: Eq>(a: &[T], b: &[T]) -> bool {
|
||||||
a.windows(b.len()).any(|aw| aw == b)
|
a.windows(b.len()).any(|aw| aw == b)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue