diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-03-03 21:26:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-03 21:26:13 +0100 |
| commit | 8ca3e59f8a768f9d246b69f629097a83af297fa1 (patch) | |
| tree | f8b051e5e83ec116e5d1cd48457679225dc35849 /src/liballoc | |
| parent | 2cfab735941e336946e339297c83e4a8cc88a1d1 (diff) | |
| parent | 10183851fbfa68241a5eeaf9b3cc575172731a6d (diff) | |
| download | rust-8ca3e59f8a768f9d246b69f629097a83af297fa1.tar.gz rust-8ca3e59f8a768f9d246b69f629097a83af297fa1.zip | |
Rollup merge of #69650 - matthiaskrgr:clnp, r=varkor
cleanup more iterator usages (and other things) * Improve weird formatting by moving comment inside else-code block. * Use .any(x) instead of .find(x).is_some() on iterators. * Use .nth(x) instead of .skip(x).next() on iterators. * Simplify conditions like x + 1 <= y to x < y * Use let instead of match to get value of enum with single variant.
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/collections/btree/node.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/collections/btree/node.rs b/src/liballoc/collections/btree/node.rs index c1bd68a020a..362755f8b7f 100644 --- a/src/liballoc/collections/btree/node.rs +++ b/src/liballoc/collections/btree/node.rs @@ -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( |
