Closed
Description
Currently serialize() is difficult to use for all users who don't want to drain vectors of string slices, but prefer keep iteration strictly read only.
Maybe, in the servo project it's uncommon to do that, but at least I am making my case and believe read-only operation should be the default.
Example
url::form_urlencoded::serialize([("client_id", "bogus"),
("scope", "A B C"].iter().map(|&(a,b)| (a, b)));
To my mind, the .map()
call should not be required.
Maybe my code is the exception though, and not the rule, but when implementing protocols one will usually have a pre-determined set of key-value pairs.
Metadata
Metadata
Assignees
Labels
No labels