avoid using NLL

This commit is contained in:
Jorge Aparicio 2018-05-03 03:35:46 +02:00
parent 1f2228e1cf
commit ffc7849f27
2 changed files with 5 additions and 2 deletions

View File

@ -202,9 +202,13 @@ where
probe_loop!(probe < self.indices.len(), {
let pos = unsafe { self.indices.get_unchecked_mut(probe) };
let mut is_none = true; // work around lack of NLL
if let Some(pos) = pos.as_mut() {
old_pos = mem::replace(pos, old_pos);
} else {
is_none = false;
}
if is_none {
*pos = Some(old_pos);
break;
}

View File

@ -53,7 +53,6 @@
#![deny(warnings)]
#![feature(const_fn)]
#![feature(core_intrinsics)]
#![feature(nll)]
#![feature(nonzero)]
#![feature(untagged_unions)]
#![no_std]