From 31b979eba1f4f0c81e355769fa9e6253cb299bf6 Mon Sep 17 00:00:00 2001 From: iximeow Date: Wed, 24 Jul 2019 22:06:26 -0700 Subject: last tweaks --- src/lib.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index cbc3c79..6689bba 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1971,7 +1971,8 @@ pub fn read_instr>(mut bytes_iter: T, instruction: &mut Ins } }, None => { - return None; + unsafe { unreachable_unchecked(); } +// return None; } } }; @@ -3076,7 +3077,9 @@ fn read_modrm>(bytes_iter: &mut T, length: &mut u8) -> Resu let modrm = match bytes_iter.next() { Some(b) => b, // TODO: ... - None => return Err("Out of bytes".to_string()), + None => { + return Err("Out of bytes".to_string()); + } }; *length += 1; Ok(modrm) -- cgit v1.1