Remove the need for rust nightly

My pidfd implmentation is simple enough, and Option.contains() is not
worth requiring nightly.
This commit is contained in:
2022-05-13 20:33:41 -07:00
parent 7e18b87707
commit f6c1020535
8 changed files with 18 additions and 59 deletions

View File

@ -12,6 +12,10 @@ pub fn init_logging(env_name: &str) {
.init();
}
pub fn opt_contains<T: PartialEq>(o: &Option<T>, v: &T) -> bool {
o.as_ref().filter(|ov| ov == &v).is_some()
}
pub fn create_atom(conn: &xcb::Connection, name: &[u8]) -> xcb::Result<x::Atom> {
let cookie = conn.send_request(&x::InternAtom {
only_if_exists: false,