Write tests and ensure adding instances works

This commit is contained in:
Lucien Greathouse
2019-10-17 13:46:45 -07:00
parent 51dcfbab75
commit 85e30cc968
9 changed files with 227 additions and 49 deletions

View File

@@ -18,6 +18,16 @@ impl RedactionMap {
}
}
pub fn get_redacted_value(&self, id: impl ToString) -> Option<String> {
let id = id.to_string();
if self.ids.contains_key(&id) {
Some(id)
} else {
None
}
}
pub fn intern(&mut self, id: impl ToString) {
let last_id = &mut self.last_id;