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:
@ -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,
|
||||
|
Reference in New Issue
Block a user