I'm somewhat upset this is a valid SSE encoding: https://github.com/goto-bus-stop/sse-codec/blob/2e585c8a9515b06b0f6e3bf75ee56cfc298835d8/src/lib.rs#L577 …
Messages can be delimited by /n, /r/n, and for some reason also /r 
-
Show this thread
-
The implication of this is that it's not possible to use BufRead::lines since it only ever captures /n and /r/n. What we need is BufRead::read_while for conditional filtering (https://docs.rs/omnom/3.0.0/omnom/trait.BufReadExt.html#method.read_while …); but was hoping I didn't have to write an async variant of it quite yet.
1 reply 0 retweets 0 likesShow this thread -
Here's the BufRead::lines impl for reference: https://doc.rust-lang.org/src/std/io/mod.rs.html#2389-2408 …
1 reply 0 retweets 0 likesShow this thread
Oh actually, scratch that. Forgot that BufRead::split takes a Pattern as an arg, which can also be a closure! https://doc.rust-lang.org/std/primitive.str.html#method.split …
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.