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

Miss __; in vec.rs #53

Open
IvanaGyro opened this issue Mar 15, 2020 · 0 comments
Open

Miss __; in vec.rs #53

IvanaGyro opened this issue Mar 15, 2020 · 0 comments

Comments

@IvanaGyro
Copy link

rust-koans/src/koans/vec.rs

Lines 160 to 172 in c6e8193

// Reversing a Vec is pretty easy in Rust
#[test]
fn reverse_vecs() {
let mut vector = vec![1, 2, 3];
assert_eq!(vector.first(), Some(&3));
}
// You can also just swap two elements in a Vec
#[test]
fn trading_spaces() {
let mut vector = vec![false, true];
assert_eq!(vector.first(), Some(&true));
}

Maybe, the tests above will be better if there are hint lines as below.

 // Reversing a Vec is pretty easy in Rust 
 #[test] 
 fn reverse_vecs() { 
     let mut vector = vec![1, 2, 3]; 
     __;
     assert_eq!(vector.first(), Some(&3)); 
 } 

 // You can also just swap two elements in a Vec 
 #[test] 
 fn trading_spaces() { 
     let mut vector = vec![false, true]; 
     __;
     assert_eq!(vector.first(), Some(&true)); 
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant