Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up`form_urlencoded::serialize(...)` handles owned as well as borrowed pairs #82
Conversation
These are strong words, when the maintainers often feel like this :) Regardless, I’m a bit reluctant to add complexity to this signature, when it seems the only reason borrowed tuples are around in the first place is that |
|
Well, at least I suspect the maintainers have less 'no idea of what they are doing' than me :). If until Rust beta, [T; N] should implement IntoIterator (and I am sceptic this will happen), my change indeed shouldn't be necessary. Personally I think the complexity in the signature is just what Rust is, and should be something we all get more and more accustomed to. Also I prefer adding complexity to the implementation to keep it light and simple on the caller's end. The needs of the many outweigh the needs of the few :) ! #81 comment will be addressed there. |

Byron commentedFeb 24, 2015
This is the result of a long path full of (my own) trial and error on how to allow
serialize()not to be hardcoded to owned tuples, and increase usability.I have added some tests which prove it now works both ways, without altering the existing API in any way (i.e. this is not a breaking change).
Even though discussed in #81, I didn't removed
serialize_owned(), as it's possibly breaking and I would want to leave that to the superior judgement of the maintainers.