mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-21 19:04:24 +00:00
ra_syntax: Apply Aleksei Kladov suggestion about TextRange of TextUnit
Co-Authored-By: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
parent
c58276673a
commit
6ae4850c89
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ impl SyntaxError {
|
|||
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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue