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:
LeonGr
2022-07-05 20:35:25 +02:00
committed by Carol (Nichols || Goulding)
parent 855f9e4e7f
commit bf755d4d46

View File

@@ -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 companys
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: