(text: &str)
| 412 | } |
| 413 | |
| 414 | fn title_text_from_stored_content(text: &str) -> String { |
| 415 | serde_json::from_str::<Value>(text) |
| 416 | .ok() |
| 417 | .and_then(|value| visible_text_from_content(&value)) |
| 418 | .unwrap_or_else(|| text.to_string()) |
| 419 | } |
| 420 | |
| 421 | fn visible_text_from_content(value: &Value) -> Option<String> { |
| 422 | match value { |
no test coverage detected