From 38cb88307e777bd2f95ee431c6f7e7493d4d0478 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 29 May 2019 10:13:27 +0300 Subject: flip Into to From --- crates/ra_syntax/src/syntax_error.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/ra_syntax/src/syntax_error.rs') 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 { Range(TextRange), } -impl Into for TextUnit { - fn into(self) -> Location { - Location::Offset(self) +impl From for Location { + fn from(offset: TextUnit) -> Location { + Location::Offset(offset) } } -impl Into for TextRange { - fn into(self) -> Location { - Location::Range(self) +impl From for Location { + fn from(range: TextRange) -> Location { + Location::Range(range) } } -- cgit v1.2.3