aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlvideoelement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/htmlvideoelement.rs')
-rw-r--r--components/script/dom/htmlvideoelement.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/components/script/dom/htmlvideoelement.rs b/components/script/dom/htmlvideoelement.rs
index 61ee1a75e2e..3e6d609f07f 100644
--- a/components/script/dom/htmlvideoelement.rs
+++ b/components/script/dom/htmlvideoelement.rs
@@ -340,8 +340,7 @@ impl FetchResponseListener for PosterFrameFetchContext {
let status_is_ok = metadata
.as_ref()
- .and_then(|m| m.status.as_ref())
- .map_or(true, |s| s.0 >= 200 && s.0 < 300);
+ .map_or(true, |m| m.status.in_range(200..300));
if !status_is_ok {
self.cancelled = true;