pub(crate) fn non_empty(s: String) -> Option<String> {
if s.is_empty() {
None
} else {
Some(s)
}
}
pub(crate) fn response_to_string(content: signal::ResponseContent) -> String {
match content {
signal::ResponseContent::Text(t) => t,
signal::ResponseContent::Json(v) => v.to_string(),
signal::ResponseContent::Error(e) => e,
}
}