diff options
author | iximeow <me@iximeow.net> | 2019-07-24 22:06:26 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2020-01-12 16:10:13 -0800 |
commit | 31b979eba1f4f0c81e355769fa9e6253cb299bf6 (patch) | |
tree | 2b46848e0ec96077f422742e7306f5a4c90f0c1e /src/lib.rs | |
parent | 5d5feaa456204c3ac40034af9d74ce3d38182f32 (diff) |
last tweaks
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1971,7 +1971,8 @@ pub fn read_instr<T: Iterator<Item=u8>>(mut bytes_iter: T, instruction: &mut Ins } }, None => { - return None; + unsafe { unreachable_unchecked(); } +// return None; } } }; @@ -3076,7 +3077,9 @@ fn read_modrm<T: Iterator<Item=u8>>(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) |