mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-09-28 04:50:34 +00:00
avoid using NLL
This commit is contained in:
parent
1f2228e1cf
commit
ffc7849f27
@ -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;
|
||||
}
|
||||
|
@ -53,7 +53,6 @@
|
||||
#![deny(warnings)]
|
||||
#![feature(const_fn)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(nll)]
|
||||
#![feature(nonzero)]
|
||||
#![feature(untagged_unions)]
|
||||
#![no_std]
|
||||
|
Loading…
x
Reference in New Issue
Block a user