clippy: Fix let_and_return warnings (#31964)

This commit is contained in:
Oluwatobi Sofela 2024-04-01 16:43:24 +01:00 committed by GitHub
parent 0da2508e4d
commit c7b73e1ef4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 17 additions and 31 deletions

View file

@ -2771,7 +2771,7 @@ impl GlobalScope {
return p;
}
let promise = match image {
match image {
ImageBitmapSource::HTMLCanvasElement(ref canvas) => {
// https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument
if !canvas.is_valid() {
@ -2815,8 +2815,7 @@ impl GlobalScope {
p.reject_error(Error::NotSupported);
return p;
},
};
promise
}
}
pub fn fire_timer(&self, handle: TimerEventId) {