mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-11 10:52:49 +03:00
Prefer cloned over map + clone in parse_block
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
This commit is contained in:
parent
d5d34d3bdf
commit
6cb0d5c3c1
@ -384,7 +384,7 @@ impl Frame {
|
|||||||
///
|
///
|
||||||
fn parse_block(&mut self, statements: impl Iterator<Item = Statement>, _span: &Span) -> Result<(), FrameError> {
|
fn parse_block(&mut self, statements: impl Iterator<Item = Statement>, _span: &Span) -> Result<(), FrameError> {
|
||||||
// Push new scope.
|
// Push new scope.
|
||||||
let scope = Scope::new(self.scopes.last().map(|scope| scope.clone()));
|
let scope = Scope::new(self.scopes.last().cloned());
|
||||||
self.push_scope(scope);
|
self.push_scope(scope);
|
||||||
|
|
||||||
// Parse all statements.
|
// Parse all statements.
|
||||||
|
Loading…
Reference in New Issue
Block a user