mirror of
https://github.com/rust-lang/book.git
synced 2026-05-17 14:21:44 -04:00
Correct method name
The text in chapter 13.1 mentions a method `shirt_giveaway`, which is actually named `giveaway` in the relevant listing and the text further on.
This commit is contained in:
committed by
Carol (Nichols || Goulding)
parent
855f9e4e7f
commit
bf755d4d46
@@ -31,7 +31,7 @@ enum called `ShirtColor` that has the variants `Red` and `Blue` (limiting the
|
||||
number of colors available for simplicity). We represent the company’s
|
||||
inventory with an `Inventory` struct that has a field named `shirts` that
|
||||
contains a `Vec<ShirtColor>` representing the shirt colors currently in stock.
|
||||
The method `shirt_giveaway` defined on `Inventory` gets the optional shirt
|
||||
The method `giveaway` defined on `Inventory` gets the optional shirt
|
||||
color preference of the free shirt winner, and returns the shirt color the
|
||||
person will get. This setup is shown in Listing 13-1:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user