aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
diff options
context:
space:
mode:
authorVeetaha <[email protected]>2020-02-06 13:42:00 +0000
committerVeetaha <[email protected]>2020-02-17 20:24:33 +0000
commit6ae4850c897ce9539b15f67375ba1d5d8f647f37 (patch)
treeddd31073bafc3cc1c3e34e871424b2d8992b794b /crates/ra_syntax
parentc58276673acbd80a3fc9c1e8ad4636079a3ff0d6 (diff)
ra_syntax: Apply Aleksei Kladov suggestion about TextRange of TextUnit
Co-Authored-By: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r--crates/ra_syntax/src/syntax_error.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/syntax_error.rs b/crates/ra_syntax/src/syntax_error.rs
index 71b228ff6..eaa825cf0 100644
--- a/crates/ra_syntax/src/syntax_error.rs
+++ b/crates/ra_syntax/src/syntax_error.rs
@@ -24,7 +24,7 @@ impl SyntaxError {
24 Self(message.into(), range) 24 Self(message.into(), range)
25 } 25 }
26 pub fn new_at_offset(message: impl Into<String>, offset: TextUnit) -> Self { 26 pub fn new_at_offset(message: impl Into<String>, offset: TextUnit) -> Self {
27 Self(message.into(), TextRange::offset_len(offset, 1.into())) 27 Self(message.into(), TextRange::offset_len(offset, 0.into()))
28 } 28 }
29 29
30 pub fn message(&self) -> &str { 30 pub fn message(&self) -> &str {