From 5d59fccbc00f0ce1d348c3cfe6d3a747efe12110 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Wed, 17 Feb 2021 20:50:42 +0800 Subject: [PATCH] services: graphics: fix warnings in lib Signed-off-by: Sean Cross --- services/graphics-server/src/lib.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/services/graphics-server/src/lib.rs b/services/graphics-server/src/lib.rs index 8a0ac00dd..6402a098d 100644 --- a/services/graphics-server/src/lib.rs +++ b/services/graphics-server/src/lib.rs @@ -6,7 +6,6 @@ pub use api::{Circle, DrawStyle, Line, PixelColor, Point, Rectangle, TextView, T use blitstr_ref as blitstr; pub use blitstr::{ClipRect, Cursor, GlyphStyle}; use xous::String; -use xous::ipc::*; pub mod op; use xous::{send_message, CID}; @@ -60,7 +59,7 @@ pub fn get_cursor(cid: CID) -> Result { )] pub fn draw_string(cid: CID, s: &String<4096>) -> Result<(), xous::Error> { let mut clone_s: String<4096> = String::new(); - write!(clone_s, "{}", s.as_str().unwrap()); + write!(clone_s, "{}", s.as_str().unwrap()).map_err(|_| xous::Error::AccessDenied)?; let request = api::Opcode::String(clone_s); let mut writer = rkyv::ArchiveBuffer::new(xous::XousBuffer::new(4096)); use rkyv::Write; @@ -110,10 +109,10 @@ pub fn glyph_height_hint(cid: CID, glyph: GlyphStyle) -> Result Result<(), xous::Error> { +pub fn draw_textview(_cid: CID, _tv: &mut TextView) -> Result<(), xous::Error> { /*/ let mut sendable_tv = Sendable::new(tv) .expect("can't create sendable TextView structure"); sendable_tv.lend_mut(cid, 0x100).map(|_| ()) */ Ok(()) -} \ No newline at end of file +}