mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
fix lint error
Signed-off-by: PotatoCP <kenzieradityatirtarahardja18@gmail.com>
This commit is contained in:
parent
a3d88a93c0
commit
c12e21bf3a
1 changed files with 4 additions and 12 deletions
|
@ -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();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue