Fix more clippy (#32740)

This commit is contained in:
石蕊 (Pi-Cla) 2024-07-09 04:47:43 +00:00 committed by GitHub
parent 4e1f623666
commit f29dd64a7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 72 additions and 90 deletions

View file

@ -306,9 +306,7 @@ impl Layout for LayoutThread {
}
fn query_content_box(&self, node: OpaqueNode) -> Option<UntypedRect<Au>> {
let Some(mut root_flow) = self.root_flow_for_query() else {
return None;
};
let mut root_flow = self.root_flow_for_query()?;
let root_flow_ref = FlowRef::deref_mut(&mut root_flow);
process_content_box_request(node, root_flow_ref)
@ -1010,7 +1008,7 @@ impl LayoutThread {
for stylesheet in &ua_stylesheets.user_or_user_agent_stylesheets {
self.stylist
.append_stylesheet(stylesheet.clone(), &ua_or_user_guard);
self.load_all_web_fonts_from_stylesheet_with_guard(&stylesheet, &ua_or_user_guard);
self.load_all_web_fonts_from_stylesheet_with_guard(stylesheet, &ua_or_user_guard);
}
if self.stylist.quirks_mode() != QuirksMode::NoQuirks {