Skip to content

Commit

Permalink
Update XCB to 0.10.1
Browse files Browse the repository at this point in the history
Does not fix https://rustsec.org/advisories/RUSTSEC-2021-0019 but if it's ever fixed, then this probably will simplify the transition
  • Loading branch information
martin-t authored and quininer committed Oct 23, 2021
1 parent d03ba7b commit edd7bc4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ license = "MIT"
travis-ci = { repository = "quininer/x11-clipboard" }

[dependencies]
xcb = { version = "0.9", features = [ "thread", "xfixes" ] }
xcb = { version = "0.10.1", features = [ "thread", "xfixes" ] }
6 changes: 5 additions & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use xcb::Atom;
use xcb::{Atom, ReplyError};
use xcb::base::{ ConnError, GenericError };
use std::fmt;
use std::sync::mpsc::SendError;
Expand All @@ -10,6 +10,7 @@ pub enum Error {
Set(SendError<Atom>),
XcbConn(ConnError),
XcbGeneric(GenericError),
XcbReply(ReplyError),
Lock,
Timeout,
Owner,
Expand All @@ -26,6 +27,7 @@ impl fmt::Display for Error {
Set(e) => write!(f, "XCB - couldn't set atom: {:?}", e),
XcbConn(e) => write!(f, "XCB connection error: {:?}", e),
XcbGeneric(e) => write!(f, "XCB generic error: {:?}", e),
XcbReply(e) => write!(f, "XCB reply error: {:?}", e),
Lock => write!(f, "XCB: Lock is poisoned"),
Timeout => write!(f, "Selection timed out"),
Owner => write!(f, "Failed to set new owner of XCB selection"),
Expand All @@ -42,6 +44,7 @@ impl StdError for Error {
Set(e) => Some(e),
XcbConn(e) => Some(e),
XcbGeneric(e) => Some(e),
XcbReply(e) => Some(e),
Lock | Timeout | Owner | UnexpectedType(_) => None,
__Unknown => unreachable!()
}
Expand All @@ -61,3 +64,4 @@ macro_rules! define_from {
define_from!(Set from SendError<Atom>);
define_from!(XcbConn from ConnError);
define_from!(XcbGeneric from GenericError);
define_from!(XcbReply from ReplyError);

0 comments on commit edd7bc4

Please sign in to comment.