Skip to content
Myr

Adding way to SSE Event (and Buffer) test for equality (#3872)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Alexander · committed by GitHub · parent 576f291 · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: alexander <alexander@xstation>

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:axum/src/response/sse.rs+4 added-1 removed
481 unmodified lines
482 buffer.extend_from_slice(value);483 buffer.put_u8(b'\n');484 }485486 /// Turns the event to `Bytes` ready to be sent487 ///488 /// If the events is already finalized just returns the `Bytes` again486 fn finalize(self) -> Bytes {489 pub fn finalize(self) -> Bytes {490 match self.buffer {491 Buffer::Finalized(bytes) => bytes,492 Buffer::Active(mut bytes_mut) => {493 bytes_mut.put_u8(b'\n');
548 unmodified lines