You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert!(!vector.is_empty());// should return false
}
The case above raise a warning:
warning: variable does not need to be mutable
--> src/koans/vec.rs:109:9
|
109 |let mut vector = vec![""; 0];| ----^^^^^^
||| help: remove this `mut`|
= note: `#[warn(unused_mut)]` on by default
The versions I am running:
cargo 1.42.0 (86334295e 2020-01-31)
rustc 1.42.0 (b8cedc004 2020-03-09)
The text was updated successfully, but these errors were encountered:
What's more, that case fails the test.
Maybe it should be
// We created an empty Vec in our first example, // now let's check if a Vec is empty #[test]fnempty_vecs(){let vector = vec!["";0];assert!(vector.is_empty());// should return true // assert!(!vector.is_empty()); // should return false }
The idea is that one is supposed to add code to make the vec non-empty between the two assertions. As in your other issue, a __; would make this more clear.
rust-koans/src/koans/vec.rs
Lines 105 to 112 in c6e8193
The case above raise a warning:
The versions I am running:
The text was updated successfully, but these errors were encountered: