mrdimidium / nanoid

A tiny, secure, URL-friendly, unique string ID generator for Rust
https://docs.rs/nanoid
MIT License
545 stars 29 forks source link

Make it possible to convert external inputs to nanoids #32

Closed rushmorem closed 1 year ago

rushmorem commented 2 years ago

This PR converts format's argument from a function pointer to a closure. This makes it more flexible as closures can capture their environment, making it possible to convert things like UUIDs to Nano IDs.