rust-hosted-langs / book

Writing Interpreters in Rust: a Guide
https://rust-hosted-langs.github.io/book/
Creative Commons Attribution 4.0 International
479 stars 27 forks source link

Simplify power of two validation #48

Closed XBagon closed 2 years ago

XBagon commented 2 years ago

Use the std function instead of direct bit arithmetic.

pliniker commented 2 years ago

Thank you! I had no idea such functions already existed.