diff options
author | Oluwatobi Sofela <60105594+oluwatobiss@users.noreply.github.com> | 2024-03-23 12:29:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-23 11:29:20 +0000 |
commit | 3c05b58221a2b5c879d31d355087a905de6494d8 (patch) | |
tree | b5f5fdd441e9d028b7a1a71782edf237400db7cd /components/script/dom/document.rs | |
parent | 3fc157338e20936b8446c4685a477fad4169d92a (diff) | |
download | servo-3c05b58221a2b5c879d31d355087a905de6494d8.tar.gz servo-3c05b58221a2b5c879d31d355087a905de6494d8.zip |
clippy: Fix `explicit_auto_deref` warnings in `components/script` (#31837)
* clippy: Fix explicit auto-deref warnings
* clippy: Fix explicit auto-deref warnings
* refactor: Tidy up code
* refactor: Fix method not found errors
Diffstat (limited to 'components/script/dom/document.rs')
-rw-r--r-- | components/script/dom/document.rs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 62ead49cb77..e6b7d07941e 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -636,7 +636,7 @@ impl Document { #[inline] pub fn window(&self) -> &Window { - &*self.window + &self.window } #[inline] @@ -2959,12 +2959,12 @@ impl<'dom> LayoutDocumentHelpers<'dom> for LayoutDom<'dom, Document> { #[inline] unsafe fn needs_paint_from_layout(self) { - (*self.unsafe_get()).needs_paint.set(true) + (self.unsafe_get()).needs_paint.set(true) } #[inline] unsafe fn will_paint(self) { - (*self.unsafe_get()).needs_paint.set(false) + (self.unsafe_get()).needs_paint.set(false) } #[inline] @@ -3306,7 +3306,7 @@ impl Document { proto: Option<HandleObject>, ) -> Fallible<DomRoot<Document>> { let doc = window.Document(); - let docloader = DocumentLoader::new(&*doc.loader()); + let docloader = DocumentLoader::new(&doc.loader()); Ok(Document::new_with_proto( window, proto, @@ -4095,8 +4095,7 @@ impl DocumentMethods for Document { }; // Step 5 - let host = match get_registrable_domain_suffix_of_or_is_equal_to(&*value, effective_domain) - { + let host = match get_registrable_domain_suffix_of_or_is_equal_to(&value, effective_domain) { None => return Err(Error::Security), Some(host) => host, }; @@ -4946,7 +4945,7 @@ impl DocumentMethods for Document { let mut names_with_first_named_element_map: HashMap<&Atom, &Element> = HashMap::new(); let name_map = self.name_map.borrow(); - for (name, elements) in &(*name_map).0 { + for (name, elements) in &(name_map).0 { if name.is_empty() { continue; } @@ -4958,7 +4957,7 @@ impl DocumentMethods for Document { } } let id_map = self.id_map.borrow(); - for (id, elements) in &(*id_map).0 { + for (id, elements) in &(id_map).0 { if id.is_empty() { continue; } |