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>.
Showing
- benches/bench.rs 2 additions, 2 deletionsbenches/bench.rs
- src/cdef.rs 9 additions, 9 deletionssrc/cdef.rs
- src/context.rs 65 additions, 65 deletionssrc/context.rs
- src/deblock.rs 24 additions, 24 deletionssrc/deblock.rs
- src/encoder.rs 51 additions, 54 deletionssrc/encoder.rs
- src/me.rs 15 additions, 15 deletionssrc/me.rs
- src/partition.rs 4 additions, 4 deletionssrc/partition.rs
- src/rdo.rs 19 additions, 19 deletionssrc/rdo.rs
Loading
Please register or sign in to comment