-
Notifications
You must be signed in to change notification settings - Fork 2
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
Move into std #3
Comments
FWIW, I noted that in indexmap-rs/indexmap#253 (comment), it actually seems to work better if
I have not, nor would I likely have time for that, but it may make sense to see if it gets any real community use as an external crate first. Of course there are also users who will ignore it until it's in the standard library. If you're interested, feel free to propose this yourself! |
Yeah, it's a bit annoying having to swap the std Thanks! |
It would be easier to implement enum Key {
K(u32, ExternalKey)
}
impl Equivalent<Key> for (u32, ExternalKey) {
..
} Inversed: enum Key {
K(u32, ExternalKey)
}
impl Equivalent<(u32, ExternalKey)> for Key {
..
} Update: disregard this. I forgot there is the orphan rule with relaxed clause. |
Just poking in here since this was pointed out by rust-lang/rust#27242 (comment) As far as crates.io is concerned, only 8 crates directly depend on Like, I think it'd be nice to have this in the standard library, but there's not really a compelling set of data to say it's needed there. |
Essentially we have HashSet<Box> and we want to do a lookup using &str. This would be possible if we had HashSet, but we need a Box for address stability. Currently this uses the raw_entry API, struct Newtype<T>(Box<T>);
impl<Q, K> Equivalent<K> for Newtype<Q>
where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
{ ... }
type BoxedSet<T> = HashSet<NewType<T>>; UPD: No, it's not possible. You have to do
|
I also want this crate to be moved into std, not only for I opened a PR which uses |
I think that there could be problems w.r.t. inference, but has moving the traits from this crate into std been considered? I couldn't find any issues on the main rust repo about it.
The text was updated successfully, but these errors were encountered: