Open andylokandy opened 5 days ago
https://github.com/risingwavelabs/jsonbb/blob/bc93534cc38a11ca01da5fbe32eb53d09350e54b/src/value_ref.rs#L207-L210
This unsafe is not always valid because user can construct the ValueRef via ValueRef::String("hello world")
ValueRef::String("hello world")
Yes. A possible solution is to wrap the &str in a new type to prevent user from constructing it.
https://github.com/risingwavelabs/jsonbb/blob/bc93534cc38a11ca01da5fbe32eb53d09350e54b/src/value_ref.rs#L207-L210
This unsafe is not always valid because user can construct the ValueRef via
ValueRef::String("hello world")