fix stdtest

This commit is contained in:
Ariel Ben-Yehuda 2016-06-06 23:41:54 +03:00
parent b2100cc7b5
commit a673cedf7b
1 changed files with 8 additions and 5 deletions

View File

@ -265,15 +265,18 @@ mod tests {
// Ensure the borrowchecker works
match queue.peek() {
Some(vec) => match &**vec {
// Note that `pop` is not allowed here due to borrow
[1] => {}
_ => return
Some(vec) => {
assert_eq!(&*vec, &[1]);
},
None => unreachable!()
}
queue.pop();
match queue.pop() {
Some(vec) => {
assert_eq!(&*vec, &[1]);
},
None => unreachable!()
}
}
}