bevyengine / bevyengine/bevy

Consider Enabling `apply_clones` Lint

Open
#14,803 0 comments 1 reaction 0 assignees View on GitHub
A-Cross-Cutting C-Performance C-Usability D-Domain-Agnostic D-Modest X-Contentious
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

#14670 is a performance improvement that uses `clone_from` instead of reassigning a cloned value.
As mentioned in ,
clippy has a lint that catches these use cases, [assigning_clones](https://rust-lang.github.io/rust-clippy/rust-1.80.0/index.html#/assigning_clones).

## What solution would you like?

PR(s) enabling this lint in bevy crates and judging its usefulness.

## What alternative(s) have you considered?

Continue doing manual profiling and code reviews when these issues are found.

## Additional context

[Open issues on clippy repo regarding this lint](https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+assigning_clones)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.