Open
Description
common function
let query_pairs = |q: &str| { q.split('&') .filter_map(|q| { let mut i = q.splitn(2, '='); let k = i.next()?; let v = i.next()?; Some((k, v)) }) .map(|(k, v)| (k.to_owned(), v.to_owned())) .collect::<HashMap<String, String>>() }; let hash_query: HashMap<String, String> = req.uri().query().map_or(HashMap::new(), query_pairs);
is good to have as util function is sdk