Comments (3)
Besides #25, I am also willing to implement IntoIter
and insert_at
, if you're not working on it already.
from stable-vec.
@burjui Thanks for the offer. No I'm not working on either right now. You can certainly implement insert_at
(in a new PR though), but I am not sure about IntoIter
yet.
This stuff is pretty tricky, I think. At least for Vec<T>
the iterator is tricky because it has to make sure nothing is dropped twice, even in the case of a panic somewhere. However, I could be wrong and it's easy for StableVec
.
Another concern I have with IntoIter
is that I am very unhappy with the current implementation. In the beginning I thought using a Vec<T>
would be a good idea until I introduced two memory unsafety bugs 🙈 (#24). That's why I very much want to rewrite the internals, presumably even in a generic way so that the user can decide which representation to use (see #2). So if IntoIter
would need any knowledge about the internals, I think it's not worth implementing it now.
However, if you can implement IntoIter
easily completely on top of the public StableVec
API (without being less efficient than it could be), I'd be very happy to merge that!
from stable-vec.
Almost everything was implemented by now. I will close this large-scope issue now. Separate issues can be created for separate features. (Example #29)
from stable-vec.
Related Issues (14)
- Use `needs_drop` once it's stabilized to speed up `drop()`
- Try out and offer different ways to store the "deleted" flag for elements HOT 2
- `IterMut::remove_current` does not drop the value HOT 1
- Random notes: performance
- Add `StableVecFacade::swap`
- Add `no_std` support with `alloc` crate
- Layout experiments
- Add benchmarks to compare `StableVec` with `HashMap`
- More and better tests and examples HOT 1
- Missing trait implementations HOT 1
- Confusion with `push` and `insert` methods HOT 1
- Rewrite `OptionCore` to avoid relying on unclear guarantees by `Vec`
- Rename `exists()` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stable-vec.