mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-22 19:34:16 +00:00
flip Into to From
This commit is contained in:
parent
2e722ec54b
commit
38cb88307e
1 changed files with 6 additions and 6 deletions
|
@ -19,15 +19,15 @@ pub enum Location {
|
|||
Range(TextRange),
|
||||
}
|
||||
|
||||
impl Into<Location> for TextUnit {
|
||||
fn into(self) -> Location {
|
||||
Location::Offset(self)
|
||||
impl From<TextUnit> for Location {
|
||||
fn from(offset: TextUnit) -> Location {
|
||||
Location::Offset(offset)
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<Location> for TextRange {
|
||||
fn into(self) -> Location {
|
||||
Location::Range(self)
|
||||
impl From<TextRange> for Location {
|
||||
fn from(range: TextRange) -> Location {
|
||||
Location::Range(range)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue