Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler error and clarify instructions #1668

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions exercises/smart_pointers/cow1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ mod tests {
#[test]
fn owned_mutation() -> Result<(), &'static str> {
// Of course this is also the case if a mutation does occur. In this
// case the call to `to_mut()` returns a reference to the same data as
// before.
// case the call to `to_mut()` in the abs_all() function returns a
// reference to the same data as before.
let slice = vec![-1, 0, 1];
let mut input = Cow::from(slice).to_mut();
let mut input = Cow::from(slice);
match abs_all(&mut input) {
// TODO
}
Expand Down