From 8b41d6250a2e895ffcd79575cada6ed0dc452378 Mon Sep 17 00:00:00 2001 From: Levi Notik Date: Wed, 20 Mar 2024 22:34:07 -0400 Subject: [PATCH] Fix typo (#158) --- src/ch04-03-fixing-ownership-errors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch04-03-fixing-ownership-errors.md b/src/ch04-03-fixing-ownership-errors.md index c1e248e0b9..015219d2b1 100644 --- a/src/ch04-03-fixing-ownership-errors.md +++ b/src/ch04-03-fixing-ownership-errors.md @@ -138,7 +138,7 @@ fn stringify_name_with_title(name: &Vec) -> String { } ``` -This solution works becauase [`slice::join`] already copies the data in `name` into the string `full`. +This solution works because [`slice::join`] already copies the data in `name` into the string `full`. In general, writing Rust functions is a careful balance of asking for the *right* level of permissions. For this example, it's most idiomatic to only expect the read permission on `name`.