... -> no_classical
This commit is contained in:
parent
46a8871749
commit
615f39327e
1 changed files with 35 additions and 1 deletions
|
|
@ -2455,4 +2455,38 @@ fn mill() -> Vec<String> {
|
||||||
.collect();
|
.collect();
|
||||||
}
|
}
|
||||||
|
|
||||||
// fn def_classical()
|
fn def_classical() -> HashMap<String, bool> {
|
||||||
|
return vec![
|
||||||
|
("all", false),
|
||||||
|
("zero", false),
|
||||||
|
("herd", false),
|
||||||
|
("names", true),
|
||||||
|
("persons", false),
|
||||||
|
("ancient", false)
|
||||||
|
]
|
||||||
|
.iter()
|
||||||
|
.map(|&(k, v)| (k.to_string(), v))
|
||||||
|
.collect();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn all_classical() -> HashMap<String, bool> {
|
||||||
|
return def_classical()
|
||||||
|
.iter()
|
||||||
|
.map(|(k, _)| (k.to_string(), true))
|
||||||
|
.collect();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn no_classical() -> HashMap<String, bool> {
|
||||||
|
return def_classical()
|
||||||
|
.iter()
|
||||||
|
.map(|(k, _)| (k.to_string(), false))
|
||||||
|
.collect();
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: May not need to be Option<bool>, or have the None case.
|
||||||
|
fn string_to_constant() -> HashMap<String, Option<bool>> {
|
||||||
|
return vec![("True", Some(true)), ("False", Some(false)), ("None", None)]
|
||||||
|
.iter()
|
||||||
|
.map(|&(k, v)| (k.to_string(), v))
|
||||||
|
.collect();
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue