mirror of
https://github.com/storytold/winit.git
synced 2026-11-22 20:30:44 +01:00
chore: appease clippy (#4471)
This commit is contained in:
1 parent
a992706c9e
commit
4ccbb97fd3
1 file changed
+7
-2
@@ -50,8 +50,13 @@ impl ImeInner {
|
||||
}
|
||||
|
||||
pub unsafe fn close_im_if_necessary(&self) -> Result<bool, XError> {
|
||||
if !self.is_destroyed && self.im.is_some() {
|
||||
unsafe { close_im(&self.xconn, self.im.as_ref().unwrap().im) }.map(|_| true)
|
||||
if !self.is_destroyed {
|
||||
if let Some(im) = &self.im {
|
||||
unsafe { close_im(&self.xconn, im.im) }?;
|
||||
Ok(true)
|
||||
} else {
|
||||
Ok(false)
|
||||
}
|
||||
} else {
|
||||
Ok(false)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user