Avoid using libstd Error::description

This commit is contained in:
Tad Hardesty 2019-11-10 20:12:26 -08:00
parent 97b928598a
commit 03ee398d74
2 changed files with 2 additions and 3 deletions

View file

@ -76,7 +76,7 @@ impl Debugger {
request_seq,
command,
success: handled.is_ok(),
message: handled.as_ref().err().map(|err| err.description().to_owned()),
message: handled.as_ref().err().map(|err| err.to_string()),
body: match handled {
Ok(result) => Some(result),
Err(_) => None,

View file

@ -309,12 +309,11 @@ impl<'a> Engine<'a> {
let mut pp = match dm::preprocessor::Preprocessor::new(ctx, environment.clone()) {
Ok(pp) => pp,
Err(err) => {
use std::error::Error;
self.issue_notification::<langserver::notification::PublishDiagnostics>(
langserver::PublishDiagnosticsParams {
uri: path_to_url(environment)?,
diagnostics: vec![langserver::Diagnostic {
message: err.description().to_owned(),
message: err.to_string(),
.. Default::default()
}],
},