You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In docs.rs we serialize Vec<String>s to pass through cargo's --config flag, this caused issues on updating from 0.5 to 0.7 as it started erroring. It looks like replacing this with ValueSerializer would take a fair chunk of code, I was wondering if you would consider having something like fn value_to_string<T: Serialize + ?Sized>(value: &T) -> Result<String, Error> as a top-level function (or maybe nested at value::to_string) wrapping this code.
The text was updated successfully, but these errors were encountered:
It looks like its 1-5 lines of code, depending on the approach taken and where rustfmt line wraps. For how often this functionality is needed, I'm a bit unsure of the pay off of this. By "this" I also include things like having to come up with names (e.g. imo use is overused and people are like to use toml::value::to_string, losing critical context and possibly conflicting).
(in cases where you have an existing string to write to and need peformance it'd only require the middle line, but for low-performance cases creating some temporary strings is more readable).
In docs.rs we serialize
Vec<String>
s to pass through cargo's--config
flag, this caused issues on updating from 0.5 to 0.7 as it started erroring. It looks like replacing this withValueSerializer
would take a fair chunk of code, I was wondering if you would consider having something likefn value_to_string<T: Serialize + ?Sized>(value: &T) -> Result<String, Error>
as a top-level function (or maybe nested atvalue::to_string
) wrapping this code.The text was updated successfully, but these errors were encountered: