From a27814db8e651100bd718efb34b2dc6a034973ea Mon Sep 17 00:00:00 2001 From: Mohamed Abdelnour Date: Fri, 21 May 2021 15:41:51 +0200 Subject: Implement `From<..>` instead of `Into<..>` --- src/pretty_printer.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pretty_printer.rs b/src/pretty_printer.rs index 1d81dc81..f60c829d 100644 --- a/src/pretty_printer.rs +++ b/src/pretty_printer.rs @@ -336,14 +336,14 @@ impl<'a> Input<'a> { } } -impl<'a> Into> for input::Input<'a> { - fn into(self) -> Input<'a> { - Input { input: self } +impl<'a> From> for Input<'a> { + fn from(input: input::Input<'a>) -> Self { + Self { input } } } -impl<'a> Into> for Input<'a> { - fn into(self) -> input::Input<'a> { - self.input +impl<'a> From> for input::Input<'a> { + fn from(Input { input }: Input<'a>) -> Self { + input } } -- cgit v1.2.3