From c349345ce856a30110ba8fc673024610f62961a4 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Wed, 17 Feb 2021 20:40:27 +0800 Subject: [PATCH] xous: get rid of most warnings Signed-off-by: Sean Cross --- xous-rs/src/process.rs | 2 -- xous-rs/src/string.rs | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/xous-rs/src/process.rs b/xous-rs/src/process.rs index c04e9740b..171a78f47 100644 --- a/xous-rs/src/process.rs +++ b/xous-rs/src/process.rs @@ -1,5 +1,3 @@ -use core::sync::atomic::AtomicU32; - #[cfg(not(target_os = "none"))] pub fn id() -> u32 { std::process::id() diff --git a/xous-rs/src/string.rs b/xous-rs/src/string.rs index 5eb35726b..f163a3c15 100644 --- a/xous-rs/src/string.rs +++ b/xous-rs/src/string.rs @@ -1,4 +1,4 @@ -use crate::{CID, Error, MemoryMessage, MemoryFlags, MemoryRange, MemorySize, Message, Result, map_memory, send_message, unmap_memory}; +use crate::{CID, Error, MemoryMessage, Result}; use rkyv::Write; use rkyv::Unarchive; @@ -35,7 +35,7 @@ impl String { pub fn from_message( message: & mut MemoryMessage, ) -> core::result::Result, core::str::Utf8Error> { - let mut buf = unsafe{ crate::XousBuffer::from_memory_message(message) }; + let buf = unsafe{ crate::XousBuffer::from_memory_message(message) }; let bytes = Pin::new(buf.as_ref()); let value = unsafe { archived_value::>(&bytes, message.id as usize) @@ -162,4 +162,4 @@ impl rkyv::Unarchive> for ArchivedString { s.len = self.len; s } -} \ No newline at end of file +}