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:
Mahmoud Al-Qudsi 2024-01-13 13:03:58 -06:00
parent a533d836dd
commit a138d74688

View File

@ -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)
}