diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-21 22:00:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-21 22:00:47 +0200 |
| commit | a160258927804710e8732ec1ec655160489f460f (patch) | |
| tree | ee88697ab298a0dce350111134d07bafef9470b5 /src/rustllvm/RustWrapper.cpp | |
| parent | aba84894d1879a7429d5bc20d0bfdca3471685de (diff) | |
| parent | d689c709ea6e942de1687d918eaee541610aa86d (diff) | |
| download | rust-a160258927804710e8732ec1ec655160489f460f.tar.gz rust-a160258927804710e8732ec1ec655160489f460f.zip | |
Rollup merge of #65092 - tspiteri:const-is-pow2, r=oli-obk
make is_power_of_two a const function This makes `is_power_of_two` a const function by using `&` instead of short-circuiting `&&`; Rust supports bitwise `&` for `bool` and short-circuiting is not required in the existing expression. I don't think this needs a const-hack label as I don't find the changed code less readable, if anything I prefer that it is clearer that short circuiting is not used. @oli-obk
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
