mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
remove unneeded contains
This commit is contained in:
parent
c7d04c2a00
commit
7d0c1f5787
1 changed files with 3 additions and 4 deletions
|
@ -337,10 +337,9 @@ impl<'a> BorrowInfState<'a> {
|
||||||
pub fn own_var(&mut self, x: Symbol) {
|
pub fn own_var(&mut self, x: Symbol) {
|
||||||
let current = self.owned.get_mut(&self.current_proc).unwrap();
|
let current = self.owned.get_mut(&self.current_proc).unwrap();
|
||||||
|
|
||||||
if current.contains(&x) {
|
if current.insert(x) {
|
||||||
// do nothing
|
// entered if key was not yet present. If so, the set is modified,
|
||||||
} else {
|
// hence we set this flag
|
||||||
current.insert(x);
|
|
||||||
self.modified = true;
|
self.modified = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue