This commit is contained in:
Simon Gardling
2023-12-08 10:12:27 -05:00
parent 8902c986f8
commit 625bfae3be
10 changed files with 18 additions and 33 deletions

View File

@@ -1,4 +1,4 @@
use std::{hint::unreachable_unchecked, intrinsics::assume};
use std::hint::unreachable_unchecked;
use crate::{generate_hint, Hint, HINT_EMPTY};
@@ -70,12 +70,6 @@ impl<'a> AutoComplete<'a> {
// Impossible for plural hints to be singular or non-existant
debug_assert!(hints.len() > 1); // check on debug
// Hint to the compiler
unsafe {
assume(hints.len() > 1);
assume(!hints.is_empty());
}
match movement {
Movement::Up => {
// Wrap self.i to maximum `i` value if needed