Closed alexkirsz closed 2 years ago
Currently, the nanoid! macro only accepts a single token as its size argument. This means that expressions such as some_path::SIZE, compute_size(), and 42 / 2 will not compile.
nanoid!
size
some_path::SIZE
compute_size()
42 / 2
This PR changes the macro to accept any expression as its size argument.
Looks great, thanks! I will release a minor update with your patch a bit later.
Currently, the
nanoid!
macro only accepts a single token as itssize
argument. This means that expressions such assome_path::SIZE
,compute_size()
, and42 / 2
will not compile.This PR changes the macro to accept any expression as its
size
argument.