Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/library/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,12 @@
ExecStep::Call(site) => {
#[cfg(feature = "log")]
eprintln!("{d}calling{z} {m}{site}{z}");
return Jump::Instr(site.into());
return Jump::Instr(site);

Check warning on line 261 in src/library/exec.rs

View check run for this annotation

Codecov / codecov/patch

src/library/exec.rs#L261

Added line #L261 was not covered by tests
}
ExecStep::Ret(site) => {
#[cfg(feature = "log")]
eprintln!("{d}returning to{z} {m}{site}{z}");
return Jump::Next(site.into());
return Jump::Next(site);

Check warning on line 266 in src/library/exec.rs

View check run for this annotation

Codecov / codecov/patch

src/library/exec.rs#L266

Added line #L266 was not covered by tests
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/library/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
writeln!(f, "ISAE: {}", self.isae_string())?;
writeln!(f, "CODE: {:x}", self.code)?;
writeln!(f, "DATA: {:x}", self.data)?;
if self.libs.len() > 0 {
if !self.libs.is_empty() {

Check warning on line 137 in src/library/lib.rs

View check run for this annotation

Codecov / codecov/patch

src/library/lib.rs#L137

Added line #L137 was not covered by tests
writeln!(
f,
"LIBS: {:8}",
Expand Down
2 changes: 1 addition & 1 deletion src/library/marshaller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ where
fn write(&mut self, value: u32, bit_count: u5) -> Result<(), CodeEofError> {
let mut cnt = bit_count.to_u8();
let value = ((value as u64) << (self.bit_pos.to_u8())).to_le_bytes();
let n_bytes = (cnt + self.bit_pos.to_u8() + 7) / 8;
let n_bytes = (cnt + self.bit_pos.to_u8()).div_ceil(8);
for i in 0..n_bytes {
if self.bytecode.as_ref().len() >= u16::MAX as usize {
return Err(CodeEofError);
Expand Down