Conversation
|
Thanks! Can you resubmit without the "let's see if it compiles" comment? :-) |
|
Can we give this another name? The name |
|
Sorry, I shouldn't have said 'makes no sense', sounds kind of harsh. I just meant that the name did not give me a hint at what the function did or how it might differ from any other |
|
I'm about to push some fixes to this branch. I've removed that comment about seeing if it works and stuck in a lower-level version which I expect to be faster. Now I think I've clarified the tests a little bit, and I've also added an As far as names, how would |
This commit adds a lower-level implementation of the generic `insert_with_key` which I expect to be faster. Now insert could be defined with insert_with_key, too, although I'm not sure we want to do that. This also clarifies the tests a bit and adds an `insert_with` function.
|
This push might still have a bug, but I have to go meet some people and don't have time to wait for tests to finish. |
|
OK, passing |
|
Pushed as |
Changes: - preparation for potential rustfmt 1.4.19 (rust-lang#4283) - chore: backport 8157a3f0afe978d3e953420577f8344db7e905bf - deps: bump rustc-ap to v669 - deps: bump rustc-ap-* to v668 - deps: bump rustc-ap* to v666 - Use correct span for match arms with the leading pipe and attributes (rust-lang#3975)
Update rustfmt and rls Closes rust-lang#74080, rust-lang#74081. rls changes: - deps: update racer and cargo rustfmt changes: - preparation for potential rustfmt 1.4.19 (rust-lang#4283) - chore: backport 8157a3f0afe978d3e953420577f8344db7e905bf - deps: bump rustc-ap to v669 - deps: bump rustc-ap-* to v668 - deps: bump rustc-ap* to v666 - Use correct span for match arms with the leading pipe and attributes (rust-lang#3975)
Automatic Rustup
As discussed in #2504, this adds an
insert_with_key([as in Haskell](http://hackage.haskell.org/packages/archive/containers/0.4.0.0/doc/html/Data-Map.html#g:5 as in Haskell)) to theMaptrait.