Skip to content

refactor(client): remove redundant clone of run_id in format macro#579

Open
VolodymyrBg wants to merge 1 commit intoPsycheFoundation:mainfrom
VolodymyrBg:refactor/remove-redundant-clone
Open

refactor(client): remove redundant clone of run_id in format macro#579
VolodymyrBg wants to merge 1 commit intoPsycheFoundation:mainfrom
VolodymyrBg:refactor/remove-redundant-clone

Conversation

@VolodymyrBg
Copy link

The format! macro in Rust works with references, so calling .clone() on p.run_id (a String) was forcing an unnecessary heap allocation and memory copy right before formatting, only to immediately drop it.
Removed the useless .clone() call from p.run_id when generating wandb_info in the centralized client (app.rs). This eliminates the redundant memory allocation and aligns the code with idiomatic Rust.

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.

1 participant