summaryrefslogtreecommitdiff
path: root/exercises
diff options
context:
space:
mode:
authorAaron Wang <az0977776@yahoo.com>2023-05-01 19:10:56 -0400
committerGitHub <noreply@github.com>2023-05-01 19:10:56 -0400
commitd3fea5f15a106b024f0b4b4d71fce91843e7ed51 (patch)
tree9d896081583982e4df6aa45459b43aef71f81db8 /exercises
parent8ed2cf7ef5209012f6948b55747a4142939f0930 (diff)
parentb75d2aa3f4e6c80668261fbcc6ac287e61029ca0 (diff)
Merge branch 'main' into patch-2
Diffstat (limited to 'exercises')
-rw-r--r--exercises/smart_pointers/cow1.rs3
1 files changed, 2 insertions, 1 deletions
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) {