Skip to content

fix: remove unnecessary clone in generate_statics#547

Open
DeVikingMark wants to merge 2 commits intonexus-xyz:mainfrom
DeVikingMark:fix/remove-unnecessary-clone
Open

fix: remove unnecessary clone in generate_statics#547
DeVikingMark wants to merge 2 commits intonexus-xyz:mainfrom
DeVikingMark:fix/remove-unnecessary-clone

Conversation

@DeVikingMark
Copy link
Contributor

Description

Removes unnecessary cloning when converting PrecompilePath to SerializablePath in generate_statics. The as_syn_path() method only needs a reference, so we can pass &PrecompilePath directly.

Changes

  • Added impl From<&PrecompilePath> for SerializablePath in precompile_path.rs
  • Updated generate_statics() to use SerializablePath::from(path) instead of SerializablePath::from((*path).clone())

@sjudson
Copy link
Contributor

sjudson commented Dec 8, 2025

Going to leave this pending since the precompile work is still in an intermediary state, and so this code may shift as part of a broader refactor.

SashaMalysehko pushed a commit to SashaMalysehko/nexus-zkvm that referenced this pull request Dec 9, 2025
* Fix benchmark pathing.

* Formatting.

* Another path fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants