Skip to content

Commit 16919da

Browse files
author
Kristoffer Ström
committed
Address naming and review comments
1 parent 32366f5 commit 16919da

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

clarity/src/vm/analysis/type_checker/contexts.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,9 @@ impl TypeMap {
8787
}
8888

8989
/// Like set_type but forcing a change if already set
90-
pub fn override_type(&mut self, expr: &SymbolicExpression, type_sig: TypeSignature) {
91-
match self.map {
92-
TypeMapDataType::Map(ref mut map) => {
93-
map.insert(expr.id, type_sig);
94-
}
95-
TypeMapDataType::Set(ref mut map) => {
96-
map.insert(expr.id);
97-
}
90+
pub fn overwrite_type(&mut self, expr: &SymbolicExpression, type_sig: TypeSignature) {
91+
if let TypeMapDataType::Map(ref mut map) = self.map {
92+
map.insert(expr.id, type_sig);
9893
}
9994
}
10095

0 commit comments

Comments
 (0)