fn span_to_lsp_range(source: &runestick::Source, span: Span) -> Option<lsp::Range> {
    let (line, character) = source.position_to_utf16cu_line_char(span.start.into_usize())?;
    let start = lsp::Position::new(line as u32, character as u32);
    let (line, character) = source.position_to_utf16cu_line_char(span.end.into_usize())?;
    let end = lsp::Position::new(line as u32, character as u32);
    Some(lsp::Range::new(start, end))
}
/// Convert the given span into an lsp range.
Convert the given span into an lsp range.
Convert the given span into an lsp range .
fn span_to_lsp_range(source: &runestick::Source, span: Span) -> Option<lsp::Range> {
    let (line, character) = source.position_to_utf16cu_line_char(span.start.into_usize())?;
    let start = lsp::Position::new(line as u32, character as u32);
    let (line, character) = source.position_to_utf16cu_line_char(span.end.into_usize())?;
    let end = lsp::Position::new(line as u32, character as u32);
    Some(lsp::Range::new(start, end))
}
fn span_to_lsp_range ( source : & runestick :: Source , span : Span ) -> Option < lsp :: Range > { let ( line , character ) = source . position_to_utf16cu_line_char ( span . start . into_usize ( ) ) ? ; let start = lsp :: Position :: new ( line as u32 , character as u32 ) ; let ( line , character ) = source . position_to_utf16cu_line_char ( span . end . into_usize ( ) ) ? ; let end = lsp :: Position :: new ( line as u32 , character as u32 ) ; Some ( lsp :: Range :: new ( start , end ) ) }
Convert the given span into an lsp range.
Convert the given span into an lsp range .
source
&runestick::Source
span
Span
source
&runestick::Source
span
Span