fn resolve_path(
    config: &DiagnosticsMapConfig,
    workspace_root: &AbsPath,
    file_name: &str,
) -> AbsPathBuf {
    match config
        .remap_prefix
        .iter()
        .find_map(|(from, to)| file_name.strip_prefix(from).map(|file_name| (to, file_name)))
    {
        Some((to, file_name)) => workspace_root.join(format!("{}{}", to, file_name)),
        None => workspace_root.join(file_name),
    }
}
/// Resolves paths applying any matching path prefix remappings, and then
/// joining the path to the workspace root.
Resolves paths applying any matching path prefix remappings, and then
joining the path to the workspace root.
Resolves paths applying any matching path prefix remappings and then joining the path to the workspace root .
fn resolve_path(
    config: &DiagnosticsMapConfig,
    workspace_root: &AbsPath,
    file_name: &str,
) -> AbsPathBuf {
    match config
        .remap_prefix
        .iter()
        .find_map(|(from, to)| file_name.strip_prefix(from).map(|file_name| (to, file_name)))
    {
        Some((to, file_name)) => workspace_root.join(format!("{}{}", to, file_name)),
        None => workspace_root.join(file_name),
    }
}
fn resolve_path ( config : & DiagnosticsMapConfig , workspace_root : & AbsPath , file_name : & str , ) -> AbsPathBuf { match config . remap_prefix . iter ( ) . find_map ( | ( from , to ) | file_name . strip_prefix ( from ) . map ( | file_name | ( to , file_name ) ) ) { Some ( ( to , file_name ) ) => workspace_root . join ( format ! ( " " to file_name ) ) , None => workspace_root . join ( file_name ) , } }
Resolves paths applying any matching path prefix remappings, and then
joining the path to the workspace root.
Resolves paths applying any matching path prefix remappings and then joining the path to the workspace root .
config
&DiagnosticsMapConfig
workspace_root
&AbsPath
file_name
&str
config
&DiagnosticsMapConfig
workspace_root
&AbsPath
file_name
&str