diff options
author | Andreas Grois <andi@grois.info> | 2022-10-23 15:09:23 +0200 |
---|---|---|
committer | Andreas Grois <andi@grois.info> | 2022-10-23 15:09:23 +0200 |
commit | d5b30baf4dd8ff8dbc4c0bd22b9178c914cbe973 (patch) | |
tree | fab24ca33da16ffd2b0517aeea34cd913cff2683 /clippy.toml | |
parent | f9938b7e5afedf5bd09095210c4a640b10c72687 (diff) |
Precompute power+exponent for iterative conversion
The maximum power of the base that can fit into a given data type is
constant. There's no point in computing it at runtime, if we can just
store it in a compile-time constants array.
The code isn't the most beautiful, but that's mostly because Rust const
functions are still a bit limited.
One function was duplicated, because it was easy to get a slow version
to compile in const context, and const context doesn't really care...
Diffstat (limited to 'clippy.toml')
0 files changed, 0 insertions, 0 deletions