use crate::UnitHttpResponse;
use regex::Regex;
use std::thread::LocalKey;
pub fn matches<'a, const N: usize>(
key: &'static LocalKey<Regex>,
other: &'a str,
) -> Option<[&'a str; N]> {
key.with(|re| re.captures(other).map(|c| c.extract().1))
}
pub fn not_found() -> UnitHttpResponse {
UnitHttpResponse::new(404)
}