Skip to content

Commit

Permalink
Get rid of more clones
Browse files Browse the repository at this point in the history
  • Loading branch information
yannham committed Oct 25, 2023
1 parent 4233254 commit 39bad0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/eval/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ impl<R: ImportResolver, C: Cache> VirtualMachine<R, C> {
Some(chunk) => {
let (arg, indent) = match chunk {
StrChunk::Literal(s) => (Term::Str(s.into()).into(), 0),
StrChunk::Expr(e, indent) => (e.clone(), indent),
StrChunk::Expr(e, indent) => (e, indent),
};

self.stack.push_str_chunks(chunks_iter);
Expand Down Expand Up @@ -761,7 +761,7 @@ impl<R: ImportResolver, C: Cache> VirtualMachine<R, C> {
Closure { body: t, env }
} else {
return Ok(Closure {
body: RichTerm::new(Term::Fun(x, t.clone()), pos),
body: RichTerm::new(Term::Fun(x, t), pos),
env,
});
}
Expand Down

0 comments on commit 39bad0d

Please sign in to comment.