1
Fork 0

Simplify conditions like x + 1 <= y to x < y

This commit is contained in:
Matthias Krüger 2020-03-02 18:53:56 +01:00
parent e364c283fd
commit 5abaeb3d67
2 changed files with 2 additions and 2 deletions

View file

@ -1191,7 +1191,7 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::
let right_len = right_node.len(); let right_len = right_node.len();
// necessary for correctness, but in a private module // necessary for correctness, but in a private module
assert!(left_len + right_len + 1 <= CAPACITY); assert!(left_len + right_len < CAPACITY);
unsafe { unsafe {
ptr::write( ptr::write(

View file

@ -189,7 +189,7 @@ impl<'tcx> Body<'tcx> {
) -> Self { ) -> Self {
// We need `arg_count` locals, and one for the return place. // We need `arg_count` locals, and one for the return place.
assert!( assert!(
local_decls.len() >= arg_count + 1, local_decls.len() > arg_count,
"expected at least {} locals, got {}", "expected at least {} locals, got {}",
arg_count + 1, arg_count + 1,
local_decls.len() local_decls.len()