mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 04:40:04 -04:00
fix clippy
This commit is contained in:
committed by
Olivier Goffart
parent
ca573df559
commit
066c091b56
@@ -22,11 +22,9 @@ pub struct XkbComposeTable {
|
|||||||
impl XkbComposeTable {
|
impl XkbComposeTable {
|
||||||
pub fn new(context: &XkbContext) -> Option<Self> {
|
pub fn new(context: &XkbContext) -> Option<Self> {
|
||||||
let locale = env::var_os("LC_ALL")
|
let locale = env::var_os("LC_ALL")
|
||||||
.and_then(|v| if v.is_empty() { None } else { Some(v) })
|
.filter(|v| !v.is_empty())
|
||||||
.or_else(|| env::var_os("LC_CTYPE"))
|
.or_else(|| env::var_os("LC_CTYPE").filter(|v| !v.is_empty()))
|
||||||
.and_then(|v| if v.is_empty() { None } else { Some(v) })
|
.or_else(|| env::var_os("LANG").filter(|v| !v.is_empty()))
|
||||||
.or_else(|| env::var_os("LANG"))
|
|
||||||
.and_then(|v| if v.is_empty() { None } else { Some(v) })
|
|
||||||
.unwrap_or_else(|| "C".into());
|
.unwrap_or_else(|| "C".into());
|
||||||
let locale = CString::new(locale.into_vec()).unwrap();
|
let locale = CString::new(locale.into_vec()).unwrap();
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ fn main() -> Result<(), impl std::error::Error> {
|
|||||||
self.windows.clear();
|
self.windows.clear();
|
||||||
event_loop.exit();
|
event_loop.exit();
|
||||||
},
|
},
|
||||||
WindowEvent::PointerEntered { device_id: _, .. } => {
|
WindowEvent::PointerEntered { .. } => {
|
||||||
// On x11, log when the cursor entered in a window even if the child window
|
// On x11, log when the cursor entered in a window even if the child window
|
||||||
// is created by some key inputs.
|
// is created by some key inputs.
|
||||||
// the child windows are always placed at (0, 0) with size (200, 200) in the
|
// the child windows are always placed at (0, 0) with size (200, 200) in the
|
||||||
|
|||||||
Reference in New Issue
Block a user