launchdarkly / rust-eventsource-client

Server-sent events (SSE) client implementation for Rust
https://docs.rs/eventsource-client/latest/eventsource_client/
Other
70 stars 23 forks source link

Move SSE parsing logic into event_parser.rs #19

Closed cwaldren-ld closed 2 years ago

cwaldren-ld commented 2 years ago

This PR refactors out the SSE parsing functionality from client.rs into a dedicated structure living in event_parser.rs.

This PR represents the bulk of https://github.com/launchdarkly/rust-eventsource-client/pull/11, with anything irrelevant to the direct task of refactoring out parsing logic not included.

Subsequent PRs will add anything left over.

I was able to remove the -skip for linefeeds. Looks like comments don't work quite yet, though.

shortcut-integration[bot] commented 2 years ago

This pull request has been linked to Shortcut Story #144463: Move event parsing logic into dedicated struct.