mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
use modify over getting a mutable reference
This commit is contained in:
parent
8a361bb68a
commit
4489a308e4
4 changed files with 27 additions and 27 deletions
|
@ -1784,7 +1784,7 @@ impl Subs {
|
|||
|
||||
pub fn modify<F>(&mut self, key: Variable, mapper: F)
|
||||
where
|
||||
F: Fn(&mut Descriptor),
|
||||
F: FnOnce(&mut Descriptor),
|
||||
{
|
||||
mapper(self.get_ref_mut(key));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue