From 6ae4850c897ce9539b15f67375ba1d5d8f647f37 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Thu, 6 Feb 2020 15:42:00 +0200 Subject: ra_syntax: Apply Aleksei Kladov suggestion about TextRange of TextUnit Co-Authored-By: Aleksey Kladov --- crates/ra_syntax/src/syntax_error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_syntax') 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 { Self(message.into(), range) } pub fn new_at_offset(message: impl Into, offset: TextUnit) -> Self { - Self(message.into(), TextRange::offset_len(offset, 1.into())) + Self(message.into(), TextRange::offset_len(offset, 0.into())) } pub fn message(&self) -> &str { -- cgit v1.2.3