Remove parking_lot dependency (#2423)
This commit is contained in:
parent
ec7e935248
commit
8729119536
16 changed files with 197 additions and 175 deletions
|
|
@ -1,7 +1,4 @@
|
|||
use std::{collections::HashMap, error::Error, fmt, os::raw::c_int, ptr};
|
||||
|
||||
use libc;
|
||||
use parking_lot::Mutex;
|
||||
use std::{collections::HashMap, error::Error, fmt, os::raw::c_int, ptr, sync::Mutex};
|
||||
|
||||
use crate::window::CursorIcon;
|
||||
|
||||
|
|
@ -74,7 +71,7 @@ impl XConnection {
|
|||
/// Checks whether an error has been triggered by the previous function calls.
|
||||
#[inline]
|
||||
pub fn check_errors(&self) -> Result<(), XError> {
|
||||
let error = self.latest_error.lock().take();
|
||||
let error = self.latest_error.lock().unwrap().take();
|
||||
if let Some(error) = error {
|
||||
Err(error)
|
||||
} else {
|
||||
|
|
@ -85,7 +82,7 @@ impl XConnection {
|
|||
/// Ignores any previous error.
|
||||
#[inline]
|
||||
pub fn ignore_error(&self) {
|
||||
*self.latest_error.lock() = None;
|
||||
*self.latest_error.lock().unwrap() = None;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue