Skip to content

Commit c4627e7

Browse files
committed
chore: clarified cow owned_no_mutation comments
1 parent 6d4a980 commit c4627e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

exercises/smart_pointers/cow1.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ mod tests {
5252
fn owned_no_mutation() -> Result<(), &'static str> {
5353
// We can also pass `slice` without `&` so Cow owns it directly.
5454
// In this case no mutation occurs and thus also no clone,
55-
// but the result is still owned because it always was.
55+
// but the result is still owned because it was never borrowed
56+
// or mutated.
5657
let slice = vec![0, 1, 2];
5758
let mut input = Cow::from(slice);
5859
match abs_all(&mut input) {

0 commit comments

Comments
 (0)