diff --git a/xous-rs/src/arch/hosted/mod.rs b/xous-rs/src/arch/hosted/mod.rs index ec20370ef..c4a0eb9b3 100644 --- a/xous-rs/src/arch/hosted/mod.rs +++ b/xous-rs/src/arch/hosted/mod.rs @@ -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); }