| Crates.io | calculate-macro |
| lib.rs | calculate-macro |
| version | 0.1.0 |
| created_at | 2024-11-17 06:16:12.312485+00 |
| updated_at | 2024-11-17 06:16:12.312485+00 |
| description | Expand the bit number of the parameters in the calculation formula to obtain the result with the expected bit number. |
| homepage | |
| repository | https://github.com/thlstsul/calculate-macro |
| max_upload_size | |
| id | 1450918 |
| size | 22,452 |
Expand the bit number of the parameters in the calculation formula to obtain the result with the expected bit number.
let a = u8::MAX;
let b = u16::MAX;
let result = calc!(a + b; u32);
assert_eq!(result, 65790u32);