-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to indexmap v2 (MSRV 1.63) #741
Conversation
@@ -193,7 +193,7 @@ where | |||
} | |||
|
|||
/// Obtains a mutable reference to a service in the ready set by index. | |||
pub fn get_ready_index_mut(&mut self, idx: usize) -> Option<(&mut K, &mut S)> { | |||
pub fn get_ready_index_mut(&mut self, idx: usize) -> Option<(&K, &mut S)> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change, so I suppose it should go on your 0.5 milestone. But if you really want the mutable key, there's an opt-in by using the MutableKeys
trait and its get_index_mut2
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's feels like more of a footgun to have the key be mutable, given the warnings mentioned in MutableKeys::get_index_mut2
... and there's really nothing in the original PR or docs that speaks specifically to the key needing to be mutable... so I think this is a worthwhile change to make given that changing the MSRV is breaking anyways.
We were later able to relax |
As a result, the latest version of tower no longer builds on Rust nightly This PR should fix that problem |
I'm not sure what you're seeing, but |
You're right, I wasn't precise. Pulling in tower by itself with no other crates, even with It seems some other crate in our workspace is turning on the So in that case, bumping indexmap to v2 on tower probably wouldn't help out since there is some other crate somewhere depending on it and turning on the feature. Apologies for the confusion here. |
OK -- |
@@ -193,7 +193,7 @@ where | |||
} | |||
|
|||
/// Obtains a mutable reference to a service in the ready set by index. | |||
pub fn get_ready_index_mut(&mut self, idx: usize) -> Option<(&mut K, &mut S)> { | |||
pub fn get_ready_index_mut(&mut self, idx: usize) -> Option<(&K, &mut S)> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's feels like more of a footgun to have the key be mutable, given the warnings mentioned in MutableKeys::get_index_mut2
... and there's really nothing in the original PR or docs that speaks specifically to the key needing to be mutable... so I think this is a worthwhile change to make given that changing the MSRV is breaking anyways.
This has been released as part of Thanks again for your contribution! |
No description provided.