Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions crates/keryx/src/sse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ where
"event" => {
self.current_event = Some(value.to_string());
}
"id" => {
// WHY: WHATWG SSE spec — an id field value containing
// U+0000 NULL must be ignored, not stored.
if !value.contains('\0') {
self.current_id = Some(value.to_string());
}
// WHY: WHATWG SSE spec — an id field value containing U+0000 NULL
// must be ignored, not stored. Expressed as a guard rather than an
// inner `if` so a NUL-bearing id falls through to the ignore arm,
// which is the same outcome by a shorter path.
"id" if !value.contains('\0') => {
self.current_id = Some(value.to_string());
}
"retry" => {
if let Ok(ms) = value.parse::<u64>() {
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly"
channel = "stable"
components = ["rustfmt", "clippy"]