Skip to content

Commit

Permalink
Only use Into if "extensive_hints"
Browse files Browse the repository at this point in the history
Co-authored-by: Gabriel Bosio <[email protected]>
  • Loading branch information
notlesh and gabrielbosio authored Nov 22, 2024
1 parent e6fe0be commit 72d27c8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions vm/src/vm/vm_memory/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,12 @@ impl<'a> RelocateValue<'a, &'a MaybeRelocatable, Cow<'a, MaybeRelocatable>> for
Ok(match value {
MaybeRelocatable::Int(_) => Cow::Borrowed(value),
MaybeRelocatable::RelocatableValue(addr) => {
#[allow(clippy::useless_conversion)]
Cow::Owned(self.relocate_value(*addr)?.into())
#[cfg(not(feature = "extensive_hints"))]
let v = self.relocate_value(*addr)?.into();
#[cfg(feature = "extensive_hints")]
let v = self.relocate_value(*addr)?;

Cow::Owned(v)
}
})
}
Expand Down

0 comments on commit 72d27c8

Please sign in to comment.