mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 04:40:04 -04:00
chore: appease clippy (#4471)
This commit is contained in:
@@ -50,8 +50,13 @@ impl ImeInner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub unsafe fn close_im_if_necessary(&self) -> Result<bool, XError> {
|
pub unsafe fn close_im_if_necessary(&self) -> Result<bool, XError> {
|
||||||
if !self.is_destroyed && self.im.is_some() {
|
if !self.is_destroyed {
|
||||||
unsafe { close_im(&self.xconn, self.im.as_ref().unwrap().im) }.map(|_| true)
|
if let Some(im) = &self.im {
|
||||||
|
unsafe { close_im(&self.xconn, im.im) }?;
|
||||||
|
Ok(true)
|
||||||
|
} else {
|
||||||
|
Ok(false)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Ok(false)
|
Ok(false)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user