diff options
author | Mohamed Abdelnour <mohamed.k.abdelnour@gmail.com> | 2021-05-21 15:41:51 +0200 |
---|---|---|
committer | David Peter <sharkdp@users.noreply.github.com> | 2021-05-27 12:05:07 +0200 |
commit | a27814db8e651100bd718efb34b2dc6a034973ea (patch) | |
tree | 69b9b9e08e1027e1a486e99828a2f5b9f91af79d | |
parent | 9702f5256c5f7feb6d207ddfb8d7c41676e1756d (diff) |
Implement `From<..>` instead of `Into<..>`
-rw-r--r-- | src/pretty_printer.rs | 12 |
1 files 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<Input<'a>> for input::Input<'a> { - fn into(self) -> Input<'a> { - Input { input: self } +impl<'a> From<input::Input<'a>> for Input<'a> { + fn from(input: input::Input<'a>) -> Self { + Self { input } } } -impl<'a> Into<input::Input<'a>> for Input<'a> { - fn into(self) -> input::Input<'a> { - self.input +impl<'a> From<Input<'a>> for input::Input<'a> { + fn from(Input { input }: Input<'a>) -> Self { + input } } |