xous-rs: hosted: Do not pass &mut data.

data is already a &mut [_] so we were passing &mut &mut [_].
This commit is contained in:
Jean-Pierre De Jesus DIAZ 2023-12-01 11:39:06 +01:00
parent 94737e9be2
commit 0a1382224a
No known key found for this signature in database
GPG key ID: 6279AEC20A9524EC

View file

@ -262,7 +262,7 @@ fn read_next_syscall_result(
} else if kind == CallMemoryKind::Borrow || kind == CallMemoryKind::MutableBorrow {
// Read the buffer back from the remote host.
use core::slice;
let mut data = unsafe { slice::from_raw_parts_mut(mem.as_mut_ptr(), mem.len()) };
let data = unsafe { slice::from_raw_parts_mut(mem.as_mut_ptr(), mem.len()) };
// If it's a Borrow, verify the contents haven't changed by saving the previous
// buffer in a Vec called `previous_data`.
@ -272,7 +272,7 @@ fn read_next_syscall_result(
};
// Read the incoming data from the network.
if let Err(e) = stream.read_exact(&mut data) {
if let Err(e) = stream.read_exact(data) {
eprintln!("Server shut down: {}", e);
std::process::exit(0);
}