diff options
author | Marcos Casagrande <marcoscvp90@gmail.com> | 2022-10-24 13:26:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-24 13:26:41 +0200 |
commit | f38666f5a348c5f40c66dd6e5896618b7f1b09bc (patch) | |
tree | 5417d17f1daaa6b6e0e5c1d8aa5400a4eb883d52 /ext/fetch/lib.rs | |
parent | b7d86b4bedbac8d7a200c36e7a63855210887ac4 (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.rs | 2 |
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>) { |