replace index_new_fields to accept_new_fields; fix #475

This commit is contained in:
qdequele 2020-02-25 15:51:37 +01:00
parent 1df51c52e0
commit a067a1b16b
No known key found for this signature in database
GPG key ID: B3F0A000EBF11745
5 changed files with 27 additions and 27 deletions

View file

@ -13,7 +13,7 @@ pub struct Schema {
indexed: Vec<FieldId>,
indexed_map: HashMap<FieldId, IndexedPos>,
index_new_fields: bool,
accept_new_fields: bool,
}
impl Schema {
@ -28,7 +28,7 @@ impl Schema {
displayed: HashSet::new(),
indexed: Vec::new(),
indexed_map: HashMap::new(),
index_new_fields: true,
accept_new_fields: true,
}
}
@ -68,7 +68,7 @@ impl Schema {
Ok(id)
}
None => {
if self.index_new_fields {
if self.accept_new_fields {
self.set_indexed(name)?;
self.set_displayed(name)
} else {
@ -190,11 +190,11 @@ impl Schema {
Ok(())
}
pub fn index_new_fields(&self) -> bool {
self.index_new_fields
pub fn accept_new_fields(&self) -> bool {
self.accept_new_fields
}
pub fn set_index_new_fields(&mut self, value: bool) {
self.index_new_fields = value;
pub fn set_accept_new_fields(&mut self, value: bool) {
self.accept_new_fields = value;
}
}