clippy: Fix suggestions in script, libservo, and servoshell (#33453)

* fix clone on copy warning in servoshell

Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>

* Remove unecessary borrow in libservo

Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>

* Ignore too many arguments warning on create_constellation()

Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>

* fix explicit auto-deref warning

Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>

* Autofix multiple clippy warnings in components/script

Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>

---------

Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>
This commit is contained in:
Ali 2024-09-14 03:41:13 -05:00 committed by GitHub
parent 6a3cdc47ec
commit ed6b1b5e6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 44 additions and 42 deletions

View file

@ -152,7 +152,7 @@ where
// Returns the existing preload data for the given WebView, or a new one.
fn ensure_preload_data_mut(&mut self, webview_id: &WebViewId) -> &mut WebViewPreloadData {
if let Entry::Vacant(entry) = self.webview_preload_data.entry(webview_id.clone()) {
if let Entry::Vacant(entry) = self.webview_preload_data.entry(*webview_id) {
entry.insert(WebViewPreloadData::default());
}
self.webview_preload_data.get_mut(webview_id).unwrap()