4 ms·
There is a clippy lint, pedantic and allowed by default, that warns about passing a large type by value. https://rust-lang.github.io/rust-clippy/master/#large_
by hcs 5y ago
There is a clippy lint, pedantic and allowed by default, that warns about passing a large type by value.
https://rust-lang.github.io/rust-clippy/master/#large_types_passed_by_value https://rust-lang.github.io/rust-clippy/master/#large_types_...
The default threshold is 256 bytes: https://github.com/rust-lang/rust-clippy/blob/1fc1aee7be6e7e71f12eacd60b9b1040e7640fe4/clippy_lints/src/utils/conf.rs#L213 https://github.com/rust-lang/rust-clippy/blob/1fc1aee7be6e7e...
So you might use that as a rule of thumb. But officially, "Generally speaking, if your type can implement Copy, it should." https://doc.rust-lang.org/std/marker/trait.Copy.html#when-should-my-type-be-copy https://doc.rust-lang.org/std/marker/trait.Copy.html#when-sh...
- kvark 5y agoThat's going to be helpful to enable in WebRender/Euclid, thank you!