Make SortedMap::new const, also faster is_empty#56969
Make SortedMap::new const, also faster is_empty#56969llogiq wants to merge 1 commit intorust-lang:masterfrom
SortedMap::new const, also faster is_empty#56969Conversation
|
r? @davidtwco (rust_highfive has picked a reviewer for you, use r? to override) |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
|
b1a39d1 to
0e57f26
Compare
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
0e57f26 to
ef5423b
Compare
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
oli-obk
left a comment
There was a problem hiding this comment.
While these can be const fn, we've previously opted not to make internal functions const fn without concrete use cases
There was a problem hiding this comment.
You need to use Vec::new() here
ef5423b to
0e6d1e9
Compare
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
0e6d1e9 to
2430870
Compare
|
☔ The latest upstream changes (presumably #56613) made this pull request unmergeable. Please resolve the merge conflicts. |
|
I'm all in favour of replacing |
|
ping from triage @davidtwco can you review this? |
I've been checking regularly to see if the conflicts have been resolved before reviewing. |
|
Okay. Updated the label to reflect the state. |
|
This is more trouble than it's worth. Closing. |
(The latter is because
[T]::is_emptycompiles to a single pointer comparison, whereaslen() == 0first subtracts the pointers and only then compares with zero)