Top level scope
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
@@ -123,3 +125,9 @@ pub enum VarKind {
|
||||
Const,
|
||||
Var,
|
||||
}
|
||||
|
||||
impl ParamList {
|
||||
pub fn to_hashmap<T>(&self, f: impl Fn(&String, &TypeExpr) -> T) -> HashMap<String, T> {
|
||||
self.0.iter().map(|(k, v)| (k.clone(), f(k, v))).collect()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user