chore (backend-rs): clean redundant match expression

This commit is contained in:
naskya 2024-04-22 00:21:10 +09:00
parent 2d8f4b945f
commit 5c6f1c818a
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -51,10 +51,7 @@ pub fn publish_to_stream(
format!(
"{{ \"type\": \"{}\", \"body\": {} }}",
kind,
match value {
Some(v) => v,
None => "null".to_string(),
}
value.unwrap_or("null".to_string()),
)
} else {
value.ok_or(Error::ValueError("Invalid streaming message".to_string()))?