Commit ea765eb
stream: simplify howMuchToRead()
This slightly refactors read by moving side effects out of
howMuchToRead().
We don't actually have to set state.needReadable = true; in
howMuchToRead() since read handles 0 return as needReadable.
PR-URL: #29155
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>1 parent cc7cec2 commit ea765eb
1 file changed
+5
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | 389 | | |
393 | 390 | | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
| 391 | + | |
400 | 392 | | |
401 | 393 | | |
402 | 394 | | |
| |||
412 | 404 | | |
413 | 405 | | |
414 | 406 | | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
415 | 411 | | |
416 | 412 | | |
417 | 413 | | |
| |||
0 commit comments