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
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user