diff options
| author | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-16 21:29:11 +0100 |
|---|---|---|
| committer | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-16 21:29:11 +0100 |
| commit | 6801bea82458ab50e6d81b3bb3f3aac7b2f93ed6 (patch) | |
| tree | afe7f431a888a3e11dfb29692ed9be0623c8bb6d /src/compiler.rs | |
| parent | ef47ba4e8bdec20a57f325efd129cc3e183e0b98 (diff) | |
| download | sylt-6801bea82458ab50e6d81b3bb3f3aac7b2f93ed6.tar.gz | |
let some fix
Diffstat (limited to 'src/compiler.rs')
| -rw-r--r-- | src/compiler.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler.rs b/src/compiler.rs index 361d93a..be99b01 100644 --- a/src/compiler.rs +++ b/src/compiler.rs @@ -630,8 +630,8 @@ impl Compiler { Value::Function(_, b) if b.borrow().name == name => Some(i), _ => None, }); - if res.is_some() { - return res.unwrap(); + if let Some(res) = res { + return res; } let constant = self.add_constant(Value::Nil); let line = self.line(); |
