Skip to content

Chapter 3 - Section Associated Types - &mut Counter is not an iterator #3

Description

@glafrance

In Chapter 3, in the section Associated Types, the provided sample code does not compile. In the main() function "for" loop you get this error:

for number in &mut counter {
   |                   ^^^^^^^^^^^^ `&mut Counter` is not an iterator

The provided code on this github repository also has the same error. Note that the provided code on this github repo does not have a main() function.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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