expose api for new settings

This commit is contained in:
qdequele 2020-01-16 19:19:44 +01:00
parent 7c14769226
commit 38d57d213f
No known key found for this signature in database
GPG key ID: B3F0A000EBF11745
5 changed files with 593 additions and 79 deletions

View file

@ -49,10 +49,7 @@ impl Schema {
}
pub fn contains<S: Into<String>>(&self, name: S) -> bool {
match self.fields_map.get_id(name.into()) {
Some(_) => true,
None => false,
}
self.fields_map.get_id(name.into()).is_some()
}
pub fn get_or_create_empty<S: Into<String>>(&mut self, name: S) -> SResult<FieldId> {