dylanhart / ulid-rs

This is a Rust implementation of the ulid project
https://crates.io/crates/ulid
MIT License
385 stars 37 forks source link

to_str variable buffer size #67

Closed WalterSmuts closed 1 year ago

WalterSmuts commented 1 year ago

Hi,

Just wondering why you allow the user to specify the buffer >=ULID_LEN. Is there any situation where the user wants to supply a larger buffer than ULID_LEN? The tradeoff you're making is having the to_str API be fallible and forcing the user to supply their own buffer.

dylanhart commented 1 year ago

Yep, that's correct. I didn't think about that at the time.