diff options
author | Aleksey Kladov <[email protected]> | 2019-05-29 08:13:27 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-05-29 08:31:07 +0100 |
commit | 38cb88307e777bd2f95ee431c6f7e7493d4d0478 (patch) | |
tree | 5abf675fd4867b77445ee98947d735b83fc795bb /crates/ra_syntax/src | |
parent | 2e722ec54b3503e2b2f411959fffb63ef9f1a334 (diff) |
flip Into to From
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r-- | crates/ra_syntax/src/syntax_error.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_syntax/src/syntax_error.rs b/crates/ra_syntax/src/syntax_error.rs index 67deee1be..d29c0cf6c 100644 --- a/crates/ra_syntax/src/syntax_error.rs +++ b/crates/ra_syntax/src/syntax_error.rs | |||
@@ -19,15 +19,15 @@ pub enum Location { | |||
19 | Range(TextRange), | 19 | Range(TextRange), |
20 | } | 20 | } |
21 | 21 | ||
22 | impl Into<Location> for TextUnit { | 22 | impl From<TextUnit> for Location { |
23 | fn into(self) -> Location { | 23 | fn from(offset: TextUnit) -> Location { |
24 | Location::Offset(self) | 24 | Location::Offset(offset) |
25 | } | 25 | } |
26 | } | 26 | } |
27 | 27 | ||
28 | impl Into<Location> for TextRange { | 28 | impl From<TextRange> for Location { |
29 | fn into(self) -> Location { | 29 | fn from(range: TextRange) -> Location { |
30 | Location::Range(self) | 30 | Location::Range(range) |
31 | } | 31 | } |
32 | } | 32 | } |
33 | 33 | ||