autocommit 2022-02-05 18:14:24 CET
This commit is contained in:
parent
2d8b3a200e
commit
3a4ae99b9a
71 changed files with 1626 additions and 1306 deletions
|
|
@ -28,7 +28,7 @@ pub enum WheelError {
|
|||
}
|
||||
|
||||
pub trait WheelDispatcher {
|
||||
fn dispatch(self: Rc<Self>) -> Result<(), Box<dyn std::error::Error + Send + Sync>>;
|
||||
fn dispatch(self: Rc<Self>) -> Result<(), Box<dyn std::error::Error>>;
|
||||
}
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd)]
|
||||
|
|
@ -172,10 +172,7 @@ struct WheelWrapper {
|
|||
}
|
||||
|
||||
impl EventLoopDispatcher for WheelWrapper {
|
||||
fn dispatch(
|
||||
self: Rc<Self>,
|
||||
events: i32,
|
||||
) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
fn dispatch(self: Rc<Self>, events: i32) -> Result<(), Box<dyn std::error::Error>> {
|
||||
if events & (c::EPOLLERR | c::EPOLLHUP) != 0 {
|
||||
return Err(Box::new(WheelError::ErrorEvent));
|
||||
}
|
||||
|
|
@ -241,7 +238,7 @@ struct PeriodicDispatcher {
|
|||
}
|
||||
|
||||
impl EventLoopDispatcher for PeriodicDispatcher {
|
||||
fn dispatch(self: Rc<Self>, events: i32) -> Result<(), Box<dyn Error + Send + Sync>> {
|
||||
fn dispatch(self: Rc<Self>, events: i32) -> Result<(), Box<dyn Error>> {
|
||||
if events & (c::EPOLLERR | c::EPOLLHUP) != 0 {
|
||||
return Err(Box::new(WheelError::ErrorEvent));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue