Extract the label string from an InlayHint.
(hint: &InlayHint)
| 37 | |
| 38 | /// Extract the label string from an InlayHint. |
| 39 | fn hint_label(hint: &InlayHint) -> String { |
| 40 | match &hint.label { |
| 41 | InlayHintLabel::String(s) => s.clone(), |
| 42 | InlayHintLabel::LabelParts(parts) => parts.iter().map(|p| p.value.as_str()).collect(), |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | /// Collect the labels from a slice of hints. |
| 47 | fn labels(hints: &[&InlayHint]) -> Vec<String> { |
no test coverage detected