summaryrefslogtreecommitdiff
path: root/ext/fetch/lib.rs
diff options
context:
space:
mode:
authorMarcos Casagrande <marcoscvp90@gmail.com>2022-10-24 13:26:41 +0200
committerGitHub <noreply@github.com>2022-10-24 13:26:41 +0200
commitf38666f5a348c5f40c66dd6e5896618b7f1b09bc (patch)
tree5417d17f1daaa6b6e0e5c1d8aa5400a4eb883d52 /ext/fetch/lib.rs
parentb7d86b4bedbac8d7a200c36e7a63855210887ac4 (diff)
fix(ext/fetch): fix `size_hint` on response body resource (#16254)
Diffstat (limited to 'ext/fetch/lib.rs')
-rw-r--r--ext/fetch/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/fetch/lib.rs b/ext/fetch/lib.rs
index 5a95fbd30..f79fc33f4 100644
--- a/ext/fetch/lib.rs
+++ b/ext/fetch/lib.rs
@@ -534,7 +534,7 @@ impl Resource for FetchResponseBodyResource {
}
fn size_hint(&self) -> (u64, Option<u64>) {
- (0, self.size)
+ (self.size.unwrap_or(0), self.size)
}
fn close(self: Rc<Self>) {