const-utils 0.1.1

Utility functions for doing simple things in a `const` function.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
with open('src/base.rs', 'r') as f:
    code = f.read()

for size in ['8', '16', '32', '64', 'size', '128']:
    utype = 'u%s' % size
    itype = 'i%s' % size
    with open(f'src/{utype}_func.rs','w') as f:
        f.write(code.replace('u8', utype))
    with open(f'src/{itype}_func.rs','w') as f:
        f.write(code.replace('u8', itype))

with open('src/usize_func.rs', 'w') as f:
    f.write(code.replace('const_utils::u8', 'const_utils').replace('u8','usize'))