services: graphics: fix warnings in lib

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2021-02-17 20:50:42 +08:00
parent c4fb83b22f
commit 5d59fccbc0

View file

@ -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<Cursor, xous::Error> {
)]
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<usize, xous::Err
}
}
pub fn draw_textview(cid: CID, tv: &mut TextView) -> 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(())
}
}