Skip to main content

suggestions_to_data

Function suggestions_to_data 

Source
pub(crate) fn suggestions_to_data(
    suggestions: &[Suggestion],
    rope: &Rope,
) -> Option<QuickFixData>
Expand description

Convert the byte-range-flavored Suggestions produced by the diagnostics formatter into LSP-shaped SuggestionData using rope to map byte offsets to line/column. Returns None when suggestions is empty so the caller can leave Diagnostic.data unset.