Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clippy: fix redundant closure #31842

Merged
merged 1 commit into from
Mar 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions components/script/dom/windowproxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ impl WindowProxy {
let window = self
.currently_active
.get()
.and_then(|id| ScriptThread::find_document(id))
.and_then(ScriptThread::find_document)
.and_then(|doc| Some(DomRoot::from_ref(doc.window())))
.unwrap();
let msg = EmbedderMsg::AllowOpeningWebView(chan);
Expand All @@ -303,7 +303,7 @@ impl WindowProxy {
let document = self
.currently_active
.get()
.and_then(|id| ScriptThread::find_document(id))
.and_then(ScriptThread::find_document)
.expect("A WindowProxy creating an auxiliary to have an active document");

let blank_url = ServoUrl::parse("about:blank").ok().unwrap();
Expand Down Expand Up @@ -500,7 +500,7 @@ impl WindowProxy {
let existing_document = self
.currently_active
.get()
.and_then(|id| ScriptThread::find_document(id))
.and_then(ScriptThread::find_document)
.unwrap();
// Step 14.1
let url = match existing_document.url().join(&url) {
Expand Down Expand Up @@ -603,7 +603,7 @@ impl WindowProxy {
pub fn document(&self) -> Option<DomRoot<Document>> {
self.currently_active
.get()
.and_then(|id| ScriptThread::find_document(id))
.and_then(ScriptThread::find_document)
}

pub fn parent(&self) -> Option<&WindowProxy> {
Expand Down