use array_windows
instead of windows
in the compiler
This commit is contained in:
parent
255a4c58f5
commit
3435683fd5
11 changed files with 21 additions and 17 deletions
|
@ -8,6 +8,7 @@
|
|||
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(array_windows)]
|
||||
#![feature(control_flow_enum)]
|
||||
#![feature(in_band_lifetimes)]
|
||||
#![feature(unboxed_closures)]
|
||||
|
|
|
@ -34,7 +34,7 @@ impl<K: Ord, V> SortedMap<K, V> {
|
|||
/// and that there are no duplicates.
|
||||
#[inline]
|
||||
pub fn from_presorted_elements(elements: Vec<(K, V)>) -> SortedMap<K, V> {
|
||||
debug_assert!(elements.windows(2).all(|w| w[0].0 < w[1].0));
|
||||
debug_assert!(elements.array_windows().all(|[fst, snd]| fst.0 < snd.0));
|
||||
|
||||
SortedMap { data: elements }
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ impl<K: Ord, V> SortedMap<K, V> {
|
|||
return;
|
||||
}
|
||||
|
||||
debug_assert!(elements.windows(2).all(|w| w[0].0 < w[1].0));
|
||||
debug_assert!(elements.array_windows().all(|[fst, snd]| fst.0 < snd.0));
|
||||
|
||||
let start_index = self.lookup_index_for(&elements[0].0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue