From cd8e56c580fd8e79eccd55790a23a4b554bbe161 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Mon, 17 Feb 2020 23:13:38 +0200 Subject: ra_syntax: remove message() method and use only Display trait in SyntaxError as per matklad --- crates/ra_syntax/src/lib.rs | 2 +- crates/ra_syntax/src/syntax_error.rs | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'crates') diff --git a/crates/ra_syntax/src/lib.rs b/crates/ra_syntax/src/lib.rs index cc02c4be5..e3f74da6d 100644 --- a/crates/ra_syntax/src/lib.rs +++ b/crates/ra_syntax/src/lib.rs @@ -115,7 +115,7 @@ impl Parse { 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 } diff --git a/crates/ra_syntax/src/syntax_error.rs b/crates/ra_syntax/src/syntax_error.rs index 135301bf6..54acf7847 100644 --- a/crates/ra_syntax/src/syntax_error.rs +++ b/crates/ra_syntax/src/syntax_error.rs @@ -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 } -- cgit v1.2.3