Skip to content

Commit

Permalink
[CLIPPY] Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
yannham committed Jan 31, 2023
1 parent 31faf98 commit bb4d423
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
7 changes: 2 additions & 5 deletions src/eval/operation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,7 @@ impl<R: ImportResolver, C: Cache> VirtualMachine<R, C> {
{
Some(value) => {
self.call_stack.enter_field(id, pos, value.pos, pos_op);
Ok(Closure {
body: value.clone(),
env,
})
Ok(Closure { body: value, env })
}
None => Err(EvalError::FieldMissing(
id.into_label(),
Expand Down Expand Up @@ -1916,7 +1913,7 @@ impl<R: ImportResolver, C: Cache> VirtualMachine<R, C> {
Some(value) => {
self.call_stack.enter_field(Ident::from(id), pos2, value.pos, pos_op);
Ok(Closure {
body: value.clone(),
body: value,
env: env2,
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/term/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ impl std::convert::TryFrom<LabeledType> for PendingContract {
fn try_from(labeled_ty: LabeledType) -> Result<Self, Self::Error> {
Ok(PendingContract::new(
labeled_ty.types.contract()?,
labeled_ty.label.clone(),
labeled_ty.label,
))
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/transform/share_normal_form.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ fn transform_rec_field(
let pending_contracts = field
.pending_contracts
.into_iter()
.map(|pending_contract| pending_contract.map_contract(|ctr| share_normal_form(ctr)))
.map(|pending_contract| pending_contract.map_contract(&mut share_normal_form))
.collect();

let value = field.value.map(share_normal_form);
let value = field.value.map(&mut share_normal_form);

Field {
value,
Expand Down

0 comments on commit bb4d423

Please sign in to comment.