Skip to content

convenience: Iterator improvements #105

@vorner

Description

@vorner

Hello

I'm reading through the code a bit. I've noticed few places for possible improvements around iterators:

  • There's an iterator support for Ipv4Network as well as Ipv6Network. But there's not one for IpNetwork. I think providing a wrapper iterator would be quite trivial.
  • The iterator types may benefit from some derived traits (eg. #[derive(Debug, Copy, Clone)].
  • Oftentimes, if there's a .iter() method for a type, the type-reference implements IntoIterator. Eg. impl IntoIterator for &Ipv4Network.

If these would be considered reasonable additions, I'd volunteer to send the pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions