mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
use set_content_unchecked; replace modify with a single set
This commit is contained in:
parent
f1e1c45f2f
commit
8c44661bc2
2 changed files with 16 additions and 21 deletions
|
@ -1720,11 +1720,13 @@ impl Subs {
|
|||
}
|
||||
|
||||
pub fn set_content(&mut self, key: Variable, content: Content) {
|
||||
// let l_key = self.utable.inlined_get_root_key(key);
|
||||
|
||||
self.utable.set_content(key, content);
|
||||
}
|
||||
|
||||
pub fn set_content_unchecked(&mut self, key: Variable, content: Content) {
|
||||
self.utable.set_content_unchecked(key, content);
|
||||
}
|
||||
|
||||
pub fn modify<F, T>(&mut self, key: Variable, mapper: F) -> T
|
||||
where
|
||||
F: FnOnce(&mut Descriptor) -> T,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue