sval-rs / value-bag

Dynamic structured values for Rust
Apache License 2.0
27 stars 3 forks source link

Use concrete 'v lifetime instead of short-lived in to_str and to_borrowed_str #45

Closed KodrAus closed 1 year ago

KodrAus commented 1 year ago

These methods were returning a shorter-than-necessary lifetime. If we're able to get a borrowed str then we're guaranteed to have a &'v str, so should use the longer lifetime in the signature.