Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Feb 11, 2024
1 parent 7f2fed8 commit f195820
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions crates/common/src/asterisc/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,28 @@ impl BasicKernelInterface for AsteriscIO {
fn write(fd: FileDescriptor, buf: &[u8]) -> Result<RegisterSize> {
unsafe {
Ok(syscall::syscall3(
SyscallNumber::Write as usize,
SyscallNumber::Write as u64,
fd.into(),
buf.as_ptr() as usize,
buf.len(),
buf.as_ptr() as u64,
buf.len() as u64,
) as RegisterSize)
}
}

fn read(fd: FileDescriptor, buf: &mut [u8]) -> Result<RegisterSize> {
unsafe {
Ok(syscall::syscall3(
SyscallNumber::Read as usize,
SyscallNumber::Read as u64,
fd.into(),
buf.as_ptr() as usize,
buf.len(),
buf.as_ptr() as u64,
buf.len() as u64,
) as RegisterSize)
}
}

fn exit(code: RegisterSize) -> ! {
unsafe {
syscall::syscall1(SyscallNumber::Exit as usize, code as usize);
syscall::syscall1(SyscallNumber::Exit as u64, code);
panic!()
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/preimage/src/oracle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ mod test {

// Ensure writing to the pipe works.
pipe_handle.write(MOCK_DATA).unwrap();
write.read(&mut buf).unwrap();
let _ = write.read(&mut buf).unwrap();
assert_eq!(buf, MOCK_DATA);

// Write mock data to the read end of the pipe; There's no host to respond.
Expand Down

0 comments on commit f195820

Please sign in to comment.