ra_syntax: remove message() method and use only Display trait in SyntaxError as per matklad
This commit is contained in:
parent
e05eb631d4
commit
cd8e56c580
@ -115,7 +115,7 @@ impl Parse<SourceFile> {
|
||||
pub fn debug_dump(&self) -> String {
|
||||
let mut buf = format!("{:#?}", self.tree().syntax());
|
||||
for err in self.errors.iter() {
|
||||
writeln!(buf, "error {:?}: {}", err.range(), err.message()).unwrap();
|
||||
writeln!(buf, "error {:?}: {}", err.range(), err).unwrap();
|
||||
}
|
||||
buf
|
||||
}
|
||||
|
@ -27,9 +27,6 @@ impl SyntaxError {
|
||||
Self(message.into(), TextRange::offset_len(offset, 0.into()))
|
||||
}
|
||||
|
||||
pub fn message(&self) -> &str {
|
||||
&self.0
|
||||
}
|
||||
pub fn range(&self) -> TextRange {
|
||||
self.1
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user