mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 15:03:46 +00:00
Replaced equality check with enum
This commit is contained in:
parent
be73d3cfc4
commit
a11d94aee2
1 changed files with 2 additions and 3 deletions
|
@ -626,9 +626,8 @@ impl<'a> BorrowInfState<'a> {
|
|||
|
||||
// own the closure environment if the function needs to own it
|
||||
let function_env_position = op.function_arity();
|
||||
if let Some(false) = function_ps
|
||||
.get(function_env_position)
|
||||
.map(|p| p.ownership == Ownership::Borrowed)
|
||||
if let Some(Ownership::Owned) =
|
||||
function_ps.get(function_env_position).map(|p| p.ownership)
|
||||
{
|
||||
self.own_var(passed_function.captured_environment);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue