cognitive-engineering-lab / rust-book

The Rust Programming Language: Experimental Edition
https://rust-book.cs.brown.edu
Other
504 stars 82 forks source link

Listing 15-25. The code defines and imports List enum simultaneously #129

Closed i-kudryavtsev closed 5 months ago

i-kudryavtsev commented 9 months ago

URL to the section(s) of the book with this problem:

Description of the problem:

Suggested fix:

willcrichton commented 5 months ago

This is intended behavior, I think. It's importing the branches of the enum so they can be referred to concisely (i.e., Cons instead of List::Cons).