Skip to content

Commit

Permalink
finish cow1
Browse files Browse the repository at this point in the history
  • Loading branch information
cyz-ing committed Jan 26, 2025
1 parent 836a953 commit 31017db
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions exercises/smart_pointers/cow1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ mod tests {
let mut input = Cow::from(&slice[..]);
match abs_all(&mut input) {
// TODO
Cow::Borrowed(_) => Ok(()),
_=> Err("Expected borrowed value"),
}
}

Expand All @@ -61,6 +63,8 @@ mod tests {
let mut input = Cow::from(slice);
match abs_all(&mut input) {
// TODO
Cow::Owned(_) => Ok(()),
_ => Err("Expected owned value"),
}
}

Expand All @@ -73,6 +77,8 @@ mod tests {
let mut input = Cow::from(slice);
match abs_all(&mut input) {
// TODO
Cow::Owned(_) => Ok(()),
_ => Err("Expected owned value"),
}
}
}

0 comments on commit 31017db

Please sign in to comment.