Our great sponsors
-
melody
Melody is a language that compiles to regular expressions and aims to be more readable and maintainable
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I'm learning Rust and working on a [project](https://github.com/yoav-lavi/melody) that consumes iterators in many places to parse a tree like structure that has positional components ([Pest](https://github.com/pest-parser/pest) output).
I'm learning Rust and working on a [project](https://github.com/yoav-lavi/melody) that consumes iterators in many places to parse a tree like structure that has positional components ([Pest](https://github.com/pest-parser/pest) output).
If g is a Vec, then .iter() returns a std::slice::Iter and .into_iter() returns a std::vec::IntoIter. It looks like slice::Iter is just the size of two pointers (as I'd expect), and clone just copies the same values, while vec::IntoIter has all the fields a Vec has, as well as 2 pointer for the range iterated over, and allocated on Clone.