Speykious / cve-rs

Blazingly 🔥 fast 🚀 memory vulnerabilities, written in 100% safe Rust. 🦀
Other
3.72k stars 94 forks source link

Use built-in constant instead of a magic number #18

Closed antifuchs closed 4 months ago

antifuchs commented 4 months ago

In job-security providing functions, it is critically important that they be fully in line with best coding practices. Hence, instead of using a well-known(ish!) hardcoded power of two, use u8::MAX to truncate the u32 into a u8.