I think a good place to start with is: "Why can we iterate over some structs in Rust's stdlib, whereas for others we need to call `.iter()` before we can iterate over them?" This might be obvious once you understand it, but it can be hard to find out without digging into the src
-
-
Show this thread
-
Using the terms I wrote about before: - entry level: learn what iterators are and how to use them. - intermediate: learn how to implement iterators for your own types. - seasoned: not sure, haven't hit this point yet.https://twitter.com/yoshuawuyts/status/1006654124505681921 …
Show this thread -
Anyway, I've implemented my first, actual iterator! This will allow us to Run Length Encode our bitfields in datrs/hypercore. This implementation will also be more efficient than the JS version because we can keep the pager sparse at all times :Dhttps://github.com/datrs/memory-pager/pull/6/files …
Show this thread -
New conversation -
-
-
Are there even any cases where you don't need a secondary struct? This seems dangerous.
-
Good question! I don't have an answer haha. From practice I think I agree it's good to always have a secondary struct.
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.