mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-22 03:23:18 +03:00
better error handling
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
use crate::{ConnectionError, FrontendEvent, FrontendRequest, IpcError};
|
||||
use std::{
|
||||
cmp::min,
|
||||
io,
|
||||
task::{ready, Poll},
|
||||
time::Duration,
|
||||
};
|
||||
@@ -47,7 +46,7 @@ impl Stream for AsyncFrontendEventReader {
|
||||
}
|
||||
|
||||
impl AsyncFrontendRequestWriter {
|
||||
pub async fn request(&mut self, request: FrontendRequest) -> Result<(), io::Error> {
|
||||
pub async fn request(&mut self, request: FrontendRequest) -> Result<(), IpcError> {
|
||||
let mut json = serde_json::to_string(&request).unwrap();
|
||||
log::debug!("requesting: {json}");
|
||||
json.push('\n');
|
||||
|
||||
Reference in New Issue
Block a user