Skip to content

Commit

Permalink
client: use stabilized io::Error::other
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxVerevkin committed Jan 12, 2025
1 parent a59a516 commit 52d2cef
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions wayrs-client/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,15 +414,12 @@ impl<D> Connection<D> {
match WlDisplay::parse_event(event, 1, &mut self.msg_buffers_pool).unwrap() {
wl_display::Event::Error(err) => {
// Catch protocol error as early as possible
return Err(io::Error::new(
io::ErrorKind::Other,
format!(
"Error in object {} (code({})): {}",
err.object_id.0,
err.code,
err.message.to_string_lossy(),
),
));
return Err(io::Error::other(format!(
"Error in object {} (code({})): {}",
err.object_id.0,
err.code,
err.message.to_string_lossy(),
)));
}
wl_display::Event::DeleteId(id) => {
return Ok(QueuedEvent::DeleteId(ObjectId(
Expand Down

0 comments on commit 52d2cef

Please sign in to comment.