mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 07:43:18 +08: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
|
@ -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 {
|
||||
a.windows(b.len()).any(|aw| aw == b)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user