From 0f44350f32dc73396f66ef2dc113fb915cd885be Mon Sep 17 00:00:00 2001 From: KAUSTUBHOG Date: Mon, 10 Nov 2025 23:06:05 +0530 Subject: [PATCH] docs: clarify comment in owned_mutation test (fix #2303) --- exercises/19_smart_pointers/cow1.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/19_smart_pointers/cow1.rs b/exercises/19_smart_pointers/cow1.rs index 1566500716..0d075ab787 100644 --- a/exercises/19_smart_pointers/cow1.rs +++ b/exercises/19_smart_pointers/cow1.rs @@ -57,9 +57,9 @@ mod tests { #[test] fn owned_mutation() { - // Of course this is also the case if a mutation does occur (not all - // numbers are absolute). In this case, the call to `to_mut()` in the - // `abs_all` function returns a reference to the same data as before. + // When the data is already owned, even if a mutation occurs, `to_mut()` + // simply returns a mutable reference to the existing owned data without + // performing any clone. let vec = vec![-1, 0, 1]; let mut input = Cow::from(vec); abs_all(&mut input);