chore (backend-rs): clean redundant match expression
This commit is contained in:
parent
2d8f4b945f
commit
5c6f1c818a
|
@ -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()))?
|
||||||
|
|
Loading…
Reference in New Issue