Fix lints for Rust 1.89 and bump MSRV to 1.88
This commit is contained in:
parent
88185f9d97
commit
d5cd0a6de9
21 changed files with 360 additions and 395 deletions
|
|
@ -1247,12 +1247,12 @@ where
|
|||
Event::Keyboard(keyboard::Event::KeyReleased { key, .. }) => {
|
||||
let state = state::<Renderer>(tree);
|
||||
|
||||
if state.is_focused.is_some() {
|
||||
if let keyboard::Key::Character("v") = key.as_ref() {
|
||||
state.is_pasting = None;
|
||||
if state.is_focused.is_some()
|
||||
&& let keyboard::Key::Character("v") = key.as_ref()
|
||||
{
|
||||
state.is_pasting = None;
|
||||
|
||||
shell.capture_event();
|
||||
}
|
||||
shell.capture_event();
|
||||
}
|
||||
|
||||
state.is_pasting = None;
|
||||
|
|
@ -1328,32 +1328,31 @@ where
|
|||
Event::Window(window::Event::RedrawRequested(now)) => {
|
||||
let state = state::<Renderer>(tree);
|
||||
|
||||
if let Some(focus) = &mut state.is_focused {
|
||||
if focus.is_window_focused {
|
||||
if matches!(
|
||||
state.cursor.state(&self.value),
|
||||
cursor::State::Index(_)
|
||||
) {
|
||||
focus.now = *now;
|
||||
if let Some(focus) = &mut state.is_focused
|
||||
&& focus.is_window_focused
|
||||
{
|
||||
if matches!(
|
||||
state.cursor.state(&self.value),
|
||||
cursor::State::Index(_)
|
||||
) {
|
||||
focus.now = *now;
|
||||
|
||||
let millis_until_redraw =
|
||||
CURSOR_BLINK_INTERVAL_MILLIS
|
||||
- (*now - focus.updated_at).as_millis()
|
||||
% CURSOR_BLINK_INTERVAL_MILLIS;
|
||||
let millis_until_redraw = CURSOR_BLINK_INTERVAL_MILLIS
|
||||
- (*now - focus.updated_at).as_millis()
|
||||
% CURSOR_BLINK_INTERVAL_MILLIS;
|
||||
|
||||
shell.request_redraw_at(
|
||||
*now + Duration::from_millis(
|
||||
millis_until_redraw as u64,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
shell.request_input_method(&self.input_method(
|
||||
state,
|
||||
layout,
|
||||
&self.value,
|
||||
));
|
||||
shell.request_redraw_at(
|
||||
*now + Duration::from_millis(
|
||||
millis_until_redraw as u64,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
shell.request_input_method(&self.input_method(
|
||||
state,
|
||||
layout,
|
||||
&self.value,
|
||||
));
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue