fix: clippy lint

This commit is contained in:
KENZ 2026-04-22 05:38:52 +09:00 committed by KENZ
parent 1963929e05
commit d413fdb593

View file

@ -244,7 +244,7 @@ where
if !state.is_focused { if !state.is_focused {
return InputMethod::Disabled; return InputMethod::Disabled;
} }
if let Some(_) = self.context_menu { if self.context_menu.is_some() {
return InputMethod::Disabled; return InputMethod::Disabled;
} }
@ -1207,10 +1207,8 @@ where
} }
Event::InputMethod(event) => match event { Event::InputMethod(event) => match event {
input_method::Event::Opened | input_method::Event::Closed => { input_method::Event::Opened | input_method::Event::Closed => {
state.preedit = matches!(event, input_method::Event::Opened).then(|| { state.preedit = matches!(event, input_method::Event::Opened)
let preedit = input_method::Preedit::new(); .then(input_method::Preedit::new);
preedit
});
} }
input_method::Event::Preedit(content, selection) => { input_method::Event::Preedit(content, selection) => {
if state.is_focused { if state.is_focused {