From bf755d4d46eaf3f2fa142a4409cbb4cd747a4790 Mon Sep 17 00:00:00 2001 From: LeonGr Date: Tue, 5 Jul 2022 20:35:25 +0200 Subject: [PATCH] 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. --- src/ch13-01-closures.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch13-01-closures.md b/src/ch13-01-closures.md index 69c0adea2..361ae64fc 100644 --- a/src/ch13-01-closures.md +++ b/src/ch13-01-closures.md @@ -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` 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: