Closed wezm closed 4 years ago
Small simplification to pick_number and pick_string. Avoid allocating one string in pick_string.
pick_number
pick_string
I added panic! to replace the assert! that was in the previous code. The behaviour is unchanged.
panic!
assert!
Actually your code is ok. Only a bug in pick_u64 would make the panic happen as all the 6-bit cases are covered.
Small simplification to
pick_number
andpick_string
. Avoid allocating one string inpick_string
.