Skip to content
Snippets Groups Projects
Commit 42d96a36 authored by Romain Vimont's avatar Romain Vimont Committed by Luca Barbato
Browse files

Make BlockOffset derive Copy

BlockOffset has a size of 128 bits (the same as a slice), and is
trivially copyable, so make it derive Copy.

Once it derives Copy, clippy suggests to never pass it by reference:
<https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref>

So pass it by value everywhere to simplify usage.

In particular, this avoids lifetimes bounds where not necessary (e.g.
in get_sub_partitions()).

See <https://github.com/xiph/rav1e/pull/1126#issuecomment-474532123>.
parent a3499ef0
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment