add singular values for bounds values
Some checks failed
Build and Test / splatoon (push) Successful in 4m35s
Build and Test / friends (push) Successful in 4m35s
Build and Test / wii-u-chat (push) Successful in 4m38s
Build and Test / super-mario-maker (push) Has been cancelled

This commit is contained in:
Maple Nebel 2026-04-28 23:54:34 +02:00
commit 5a69d2acf5

View file

@ -115,9 +115,13 @@ fn read_bounds_string<T: FromStr>(str: &str) -> Option<(T, T)> {
} }
fn check_bounds_str<T: FromStr + PartialOrd>(compare: T, str: &str) -> Option<bool> { fn check_bounds_str<T: FromStr + PartialOrd>(compare: T, str: &str) -> Option<bool> {
let bounds: (T, T) = read_bounds_string(str)?; if let Some(bounds) = read_bounds_string::<T>(str) {
return Some(bounds.0 <= compare && compare <= bounds.1);
Some(bounds.0 <= compare && compare <= bounds.1) }
if let Ok(val) = T::from_str(str) {
return Some(val == compare);
}
None
} }
pub async fn broadcast_notification<T: AsRef<User>>( pub async fn broadcast_notification<T: AsRef<User>>(