Fix unused borrow warning

`#[warn(unused_must_use)]` is on, prompting a compiler warning like:
"unused borrow that must be used".
This commit is contained in:
Andrew Brown
2021-07-28 15:05:46 -07:00
parent 323197ea93
commit e3c56efd3e

View File

@@ -435,7 +435,7 @@ impl CompiledExpression {
let new_to = landing_positions[&marker]; let new_to = landing_positions[&marker];
let new_diff = new_to as isize - new_from as isize; let new_diff = new_to as isize - new_from as isize;
// FIXME: use encoding? LittleEndian for now... // FIXME: use encoding? LittleEndian for now...
&code_buf[new_from - 2..new_from] code_buf[new_from - 2..new_from]
.copy_from_slice(&(new_diff as i16).to_le_bytes()); .copy_from_slice(&(new_diff as i16).to_le_bytes());
} }
Ok(Some((func_index, start, end, code_buf))) Ok(Some((func_index, start, end, code_buf)))