diff options
| author | Hunter Kvalevog <hunter@kvog.sh> | 2026-09-27 18:04:07 -0500 |
|---|---|---|
| committer | Hunter Kvalevog <hunter@kvog.sh> | 2026-09-27 18:04:07 -0500 |
| commit | 472f99c8011b8de3f796c1ddc5d8f50164a34940 (patch) | |
| tree | 49b14da76ada52943ce4fd147c2aa3fe50d05d1a /rustlings/exercises/19_smart_pointers/cow1.rs | |
| parent | 67fb6c0eb507965836201551f90c7d637bf6cee0 (diff) | |
rustlings: complete 19
Diffstat (limited to 'rustlings/exercises/19_smart_pointers/cow1.rs')
| -rw-r--r-- | rustlings/exercises/19_smart_pointers/cow1.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/rustlings/exercises/19_smart_pointers/cow1.rs b/rustlings/exercises/19_smart_pointers/cow1.rs index 1566500..56a25b9 100644 --- a/rustlings/exercises/19_smart_pointers/cow1.rs +++ b/rustlings/exercises/19_smart_pointers/cow1.rs @@ -38,8 +38,7 @@ mod tests { let vec = vec![0, 1, 2]; let mut input = Cow::from(&vec); abs_all(&mut input); - // TODO: Replace `todo!()` with `Cow::Owned(_)` or `Cow::Borrowed(_)`. - assert!(matches!(input, todo!())); + assert!(matches!(input, Cow::Borrowed(_))); } #[test] @@ -51,8 +50,7 @@ mod tests { let vec = vec![0, 1, 2]; let mut input = Cow::from(vec); abs_all(&mut input); - // TODO: Replace `todo!()` with `Cow::Owned(_)` or `Cow::Borrowed(_)`. - assert!(matches!(input, todo!())); + assert!(matches!(input, Cow::Owned(_))); } #[test] @@ -63,7 +61,6 @@ mod tests { let vec = vec![-1, 0, 1]; let mut input = Cow::from(vec); abs_all(&mut input); - // TODO: Replace `todo!()` with `Cow::Owned(_)` or `Cow::Borrowed(_)`. - assert!(matches!(input, todo!())); + assert!(matches!(input, Cow::Owned(_))); } } |