mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
clippy: Fix some warnings in components/script
(#31849)
* clippy: fixed some warnings in components/script * fixed formatting * fix formatting
This commit is contained in:
parent
dbe3cb8a3c
commit
d8adeb1b44
7 changed files with 24 additions and 27 deletions
|
@ -288,20 +288,17 @@ pub fn get_descriptor_permission_state(
|
|||
// and let the user decide to grant the permission or not.
|
||||
let state = if allowed_in_nonsecure_contexts(&permission_name) {
|
||||
PermissionState::Prompt
|
||||
} else if pref!(dom.permissions.testing.allowed_in_nonsecure_contexts) {
|
||||
PermissionState::Granted
|
||||
} else {
|
||||
if pref!(dom.permissions.testing.allowed_in_nonsecure_contexts) {
|
||||
PermissionState::Granted
|
||||
} else {
|
||||
globalscope
|
||||
.permission_state_invocation_results()
|
||||
.borrow_mut()
|
||||
.remove(&permission_name.to_string());
|
||||
|
||||
prompt_user_from_embedder(
|
||||
PermissionPrompt::Insecure(embedder_traits::PermissionName::from(permission_name)),
|
||||
&globalscope,
|
||||
)
|
||||
}
|
||||
globalscope
|
||||
.permission_state_invocation_results()
|
||||
.borrow_mut()
|
||||
.remove(&permission_name.to_string());
|
||||
prompt_user_from_embedder(
|
||||
PermissionPrompt::Insecure(embedder_traits::PermissionName::from(permission_name)),
|
||||
&globalscope,
|
||||
)
|
||||
};
|
||||
|
||||
// Step 3.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue