-
Notifications
You must be signed in to change notification settings - Fork 72
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
Could you expand on why slottable values must be Copy
?
#27
Comments
Sorry for the slow reply, I'm very busy at the moment. I'll have more time soon to work on my own projects. The short answer used to be that I could have implemented Since then I've come to regret removing this variant as it has legitimate uses (and avoids this restriction). I will bring it back once I continue work on |
Thanks for responding! That makes sense. Judging by the fact that I still get an error for non- |
It would be great if (Sorry for going off topic, but thanks for all the work you've put into this crate! It's great to have a good slot map implementation in Rust.) |
This get closed, but without a final explanation. |
@AndreaCatania The workarounds are mentioned in the docs (although I do notice a typo just now, " https://docs.rs/slotmap/0.3.0/slotmap/trait.Slottable.html The workarounds are:
|
Thanks for the reply! I'll try to use the |
By the way, the reason why I've asked it is because use a secondary map is not easily doable in my case, and require to change a big part of the software. |
Sorry, what you want is not available in stable Rust at the moment without introducing a lot of memory overhead in the internal implementation. I will be reintroducing the |
This page (and something on Pittsburgh) are the only Google results to "BlockSlotMap". Is it safe to assume this has not been reintroduced yet? Or maybe it could be merged with SlotMap? (Or HopSlotMap?) Or would that be a bad idea? Just seems a little inelegant to have three variants of the same library. |
The "no-Copy" feature of |
The docs mention that a type must implement
Copy
due to "current stable Rust restrictions". Could you expand on that?The text was updated successfully, but these errors were encountered: