You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.
I'm trying to format file below and VSCode is not really responding at all. I see no useful info in the output panel.
// Copyright 2016 The RLS Project Developers.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::path::{PathBuf};
use {Def, Analysis};
pub fn mk_src_url(def: &Def, path_prefix: Option<&PathBuf>, analysis: &Analysis) -> Option<String> {
let path_prefix = match path_prefix {
Some(pp) => pp,
None => return
None,
};
let file_path = &def.span.file;
let file_path = match file_path.strip_prefix(&path_prefix) {
Ok(p) => p,
Err(_) => return None,
};
if def.api_crate {
Some(format!("{}/{}#L{}-L{}",
analysis.src_url_base,
file_path.to_str().unwrap(),
def.span.range.row_start.one_indexed().0,
def.span.range.row_end.one_indexed().0))
} else {
None
}
}
The text was updated successfully, but these errors were encountered:
I'm trying to format file below and VSCode is not really responding at all. I see no useful info in the output panel.
The text was updated successfully, but these errors were encountered: