From c4627e7112f38a74e677f358bf5eafc7214c5a4f Mon Sep 17 00:00:00 2001 From: PiqqiDesigns Date: Thu, 27 Apr 2023 15:49:40 -0700 Subject: [PATCH] chore: clarified cow owned_no_mutation comments --- exercises/smart_pointers/cow1.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exercises/smart_pointers/cow1.rs b/exercises/smart_pointers/cow1.rs index 885138a..bc5b28e 100644 --- a/exercises/smart_pointers/cow1.rs +++ b/exercises/smart_pointers/cow1.rs @@ -52,7 +52,8 @@ mod tests { fn owned_no_mutation() -> Result<(), &'static str> { // We can also pass `slice` without `&` so Cow owns it directly. // In this case no mutation occurs and thus also no clone, - // but the result is still owned because it always was. + // but the result is still owned because it was never borrowed + // or mutated. let slice = vec![0, 1, 2]; let mut input = Cow::from(slice); match abs_all(&mut input) {