chiark / gitweb /
Fix that horrible loop in the streaming subthread.
authorSimon Tatham <anakin@pobox.com>
Fri, 5 Jan 2024 22:55:13 +0000 (22:55 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 6 Jan 2024 00:21:22 +0000 (00:21 +0000)
commit67b2627c0b5d67820b8e96043930aaf550d82330
tree5074b962c633ceed4fc6e1760078c5762f820860
parent9bdc99f8991d09b120c549c847a0a83d5b2267e3
Fix that horrible loop in the streaming subthread.

Clippy complained about it at fatal-error level because it never loops
more than once. I only wrote that loop so I could break it in multiple
places with different return values.

But I've had a better idea for how to write the fiddly bit, thanks to
remembering that Peekable is a thing. This is nicer.
src/client.rs