mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Feedback
This commit is contained in:
parent
b7a7a735fc
commit
9f23c3d26a
1 changed files with 5 additions and 6 deletions
|
@ -404,7 +404,7 @@ fn specialize_drops_stmt<'a, 'i>(
|
|||
Stmt::Ret(symbol) => arena.alloc(Stmt::Ret(*symbol)),
|
||||
Stmt::Refcounting(rc, continuation) => match rc {
|
||||
ModifyRc::Inc(symbol, count) => {
|
||||
let inc_before = environment.incremented_symbols.contained(symbol);
|
||||
let inc_before = environment.incremented_symbols.contains(symbol);
|
||||
|
||||
// Add a symbol for every increment performed.
|
||||
environment
|
||||
|
@ -1499,11 +1499,10 @@ fn low_level_no_rc(lowlevel: &LowLevel) -> RC {
|
|||
}
|
||||
}
|
||||
|
||||
/// Map that contains a count for each key.
|
||||
/// Keys with a count of 0 are kept around, so that it can be seen that they were once present.
|
||||
#[derive(Clone)]
|
||||
struct CountingMap<K>
|
||||
where
|
||||
K: Eq + std::hash::Hash + Clone,
|
||||
{
|
||||
struct CountingMap<K> {
|
||||
map: MutMap<K, u64>,
|
||||
}
|
||||
|
||||
|
@ -1539,7 +1538,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
fn contained(&self, symbol: &K) -> bool {
|
||||
fn contains(&self, symbol: &K) -> bool {
|
||||
self.map.contains_key(symbol)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue