ewilken / hap-rs

Rust implementation of the Apple HomeKit Accessory Protocol (HAP)
Apache License 2.0
196 stars 33 forks source link

style: clippy #66

Closed somehowchris closed 2 years ago

somehowchris commented 2 years ago

Just some clippy suggestions + applying cargo clippy --allow-dirty --fix to remove things such as clones generated by codegen where a copy would be possible

somehowchris commented 2 years ago

Would you mind explaining what you exactly mean by “modifies”.

Yes, I have modified the files. i.e. it removes additions of @index if its 0 as this might not be optimized away by the compiler if it can’t detect what’s going on.

But in terms of modification of behavior, it should do the exact same as id + 3 + 0 is the same as id + 3.

But again, that’s a clippy suggestion.