Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pola-rs
GitHub Repository: pola-rs/polars
Path: blob/main/crates/polars-utils/src/select.rs
6939 views
1
#[cfg(feature = "nightly")]
2
pub fn select_unpredictable<T>(cond: bool, true_val: T, false_val: T) -> T {
3
core::hint::select_unpredictable(cond, true_val, false_val)
4
}
5
6
#[cfg(not(feature = "nightly"))]
7
pub fn select_unpredictable<T>(cond: bool, true_val: T, false_val: T) -> T {
8
if cond { true_val } else { false_val }
9
}
10
11