mirror of
https://github.com/servo/servo.git
synced 2025-07-22 06:43:40 +01:00
clippy: Fix unnecessary_cast
warnings in components/script
(#31823)
* clippy: Fix unnecessary cast warnings * clippy: Replace redundant field names with their shorthand alternatives * clippy: Delete struct pattern dereferencings
This commit is contained in:
parent
3e9b808938
commit
bae77671f8
21 changed files with 32 additions and 45 deletions
|
@ -2334,7 +2334,7 @@ impl HTMLMediaElementMethods for HTMLMediaElement {
|
|||
if let Some(ref player) = *self.player.borrow() {
|
||||
if let Ok(ranges) = player.lock().unwrap().buffered() {
|
||||
for range in ranges {
|
||||
let _ = buffered.add(range.start as f64, range.end as f64);
|
||||
let _ = buffered.add(range.start, range.end);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2504,7 +2504,7 @@ impl MicrotaskRunnable for MediaElementMicrotask {
|
|||
elem.resource_selection_algorithm_sync(base_url.clone());
|
||||
}
|
||||
},
|
||||
&MediaElementMicrotask::PauseIfNotInDocumentTask { ref elem } => {
|
||||
MediaElementMicrotask::PauseIfNotInDocumentTask { elem } => {
|
||||
if !elem.upcast::<Node>().is_connected() {
|
||||
elem.internal_pause_steps();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue