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();
// necessary for correctness, but in a private module
assert!(left_len + right_len + 1 <= CAPACITY);
assert!(left_len + right_len < CAPACITY);
unsafe {
ptr::write(

View File

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