mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Simplify conditions like x + 1 <= y to x < y
This commit is contained in:
@@ -1191,7 +1191,7 @@ pub fn merge(
|
||||
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(
|
||||
|
||||
@@ -189,7 +189,7 @@ pub fn new(
|
||||
) -> 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()
|
||||
|
||||
Reference in New Issue
Block a user