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
1 changed files with 1 additions and 4 deletions

View File

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