fix lint error

Signed-off-by: PotatoCP <kenzieradityatirtarahardja18@gmail.com>
This commit is contained in:
PotatoCP 2025-06-03 11:13:27 +08:00
parent a3d88a93c0
commit c12e21bf3a

View file

@ -846,17 +846,9 @@ pub(crate) fn handle_send_keys_setup(
reply reply
.send( .send(
find_node_by_unique_id(documents, pipeline, element_id).and_then(|node| { find_node_by_unique_id(documents, pipeline, element_id).and_then(|node| {
let file_input = { let file_input = node
if let Some(input_element) = node.downcast::<HTMLInputElement>() { .downcast::<HTMLInputElement>()
if input_element.input_type() == InputType::File { .filter(|&input_element| input_element.input_type() == InputType::File);
Some(input_element)
} else {
None
}
} else {
None
}
};
if file_input.is_none() || strict_file_interactability { if file_input.is_none() || strict_file_interactability {
match node.downcast::<HTMLElement>() { match node.downcast::<HTMLElement>() {
@ -883,7 +875,7 @@ pub(crate) fn handle_send_keys_setup(
// TODO: Check non-typeable form control // TODO: Check non-typeable form control
return Ok(true); Ok(true)
}), }),
) )
.unwrap(); .unwrap();