We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2100cc commit a673cedCopy full SHA for a673ced
src/libstd/sync/mpsc/spsc_queue.rs
@@ -265,15 +265,18 @@ mod tests {
265
266
// Ensure the borrowchecker works
267
match queue.peek() {
268
- Some(vec) => match &**vec {
269
- // Note that `pop` is not allowed here due to borrow
270
- [1] => {}
271
- _ => return
+ Some(vec) => {
+ assert_eq!(&*vec, &[1]);
272
},
273
None => unreachable!()
274
}
275
276
- queue.pop();
+ match queue.pop() {
277
+ },
278
+ None => unreachable!()
279
+ }
280
281
282
0 commit comments