cleanup chat-test

This commit is contained in:
bunnie 2024-09-23 16:41:43 +08:00
parent 1ec66137be
commit 3ce6baa202

View file

@ -5,7 +5,7 @@ mod api;
mod tests; mod tests;
use api::*; use api::*;
use chat::{Chat, Event, POST_TEXT_MAX}; use chat::{Chat, Event};
use num_traits::*; use num_traits::*;
use xous_ipc::Buffer; use xous_ipc::Buffer;
@ -76,7 +76,7 @@ fn wrapped_main() -> ! {
} }
Some(ChatTestOp::Post) => { Some(ChatTestOp::Post) => {
let buffer = unsafe { Buffer::from_memory_message(msg.body.memory_message().unwrap()) }; let buffer = unsafe { Buffer::from_memory_message(msg.body.memory_message().unwrap()) };
let s = buffer.to_original::<String<{ POST_TEXT_MAX }>, _>().unwrap(); let s = buffer.to_original::<String, _>().unwrap();
if s.len() > 0 { if s.len() > 0 {
// capture input instead of calling here, so message can drop and calling server is // capture input instead of calling here, so message can drop and calling server is
// released // released