4061: ra_proc_macro: cleanups here and there r=edwin0cheng a=Veetaha

r? @edwin0cheng 

Co-authored-by: veetaha <veetaha2@gmail.com>
Co-authored-by: Veetaha <veetaha2@gmail.com>
This commit is contained in:
bors[bot]
2020-04-20 20:25:33 +00:00
committed by GitHub
12 changed files with 142 additions and 191 deletions

View File

@@ -148,20 +148,17 @@ impl WorldState {
let proc_macro_client = match &config.proc_macro_srv {
None => ProcMacroClient::dummy(),
Some((path, args)) => {
let path = std::path::Path::new(path);
match ProcMacroClient::extern_process(path, args) {
Ok(it) => it,
Err(err) => {
log::error!(
"Fail to run ra_proc_macro_srv from path {}, error : {}",
path.to_string_lossy(),
err
);
ProcMacroClient::dummy()
}
Some((path, args)) => match ProcMacroClient::extern_process(path.into(), args) {
Ok(it) => it,
Err(err) => {
log::error!(
"Fail to run ra_proc_macro_srv from path {}, error: {:?}",
path,
err
);
ProcMacroClient::dummy()
}
}
},
};
workspaces