about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-10-21 22:00:47 +0200
committerGitHub <noreply@github.com>2019-10-21 22:00:47 +0200
commita160258927804710e8732ec1ec655160489f460f (patch)
treeee88697ab298a0dce350111134d07bafef9470b5 /src/rustllvm/RustWrapper.cpp
parentaba84894d1879a7429d5bc20d0bfdca3471685de (diff)
parentd689c709ea6e942de1687d918eaee541610aa86d (diff)
downloadrust-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