ra_syntax: Apply Aleksei Kladov suggestion about TextRange of TextUnit

Co-Authored-By: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
Veetaha 2020-02-06 15:42:00 +02:00 committed by Veetaha
parent c58276673a
commit 6ae4850c89

View File

@ -24,7 +24,7 @@ pub fn new(message: impl Into<String>, range: TextRange) -> Self {
Self(message.into(), range)
}
pub fn new_at_offset(message: impl Into<String>, 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 {