1#[cfg(all(
6 feature = "multithread",
7 not(feature = "unknown-ci"),
8 not(all(target_os = "macos", feature = "apple-sandbox")),
9))]
10#[allow(dead_code)]
11pub(crate) fn into_iter<T>(val: T) -> T::Iter
12where
13 T: rayon::iter::IntoParallelIterator,
14{
15 val.into_par_iter()
16}
17
18#[cfg(any(
21 not(feature = "multithread"),
22 feature = "unknown-ci",
23 all(target_os = "macos", feature = "apple-sandbox")
24))]
25#[allow(dead_code)]
26pub(crate) fn into_iter<T>(val: T) -> T::IntoIter
27where
28 T: IntoIterator,
29{
30 val.into_iter()
31}
32
33#[cfg(all(
36 feature = "multithread",
37 not(feature = "unknown-ci"),
38 not(all(target_os = "macos", feature = "apple-sandbox")),
39))]
40pub(crate) fn into_iter_mut<'a, T>(
41 val: &'a mut T,
42) -> <T as rayon::iter::IntoParallelRefMutIterator<'a>>::Iter
43where
44 T: rayon::iter::IntoParallelRefMutIterator<'a> + ?Sized,
45{
46 val.par_iter_mut()
47}
48
49#[cfg(any(
56 not(feature = "multithread"),
57 feature = "unknown-ci",
58 all(target_os = "macos", feature = "apple-sandbox")
59))]
60pub(crate) fn into_iter_mut<T>(val: T) -> T::IntoIter
61where
62 T: IntoIterator,
63{
64 val.into_iter()
65}