Remove unwrap_none/expect_none from compiler/.

This commit is contained in:
Mara Bos
2021-03-04 13:06:01 +01:00
parent 895a8e71b1
commit cfb4ad4f2a
10 changed files with 38 additions and 23 deletions

View File

@@ -339,7 +339,7 @@ impl<'tcx, Tag: Copy, Extra: AllocationExtra<Tag>> Allocation<Tag, Extra> {
for dest in bytes {
*dest = src.next().expect("iterator was shorter than it said it would be");
}
src.next().expect_none("iterator was longer than it said it would be");
assert_matches!(src.next(), None, "iterator was longer than it said it would be");
Ok(())
}