From aea2a6f8361c95d60cc8e2757ca473f6915902a9 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Tue, 31 Dec 2024 01:56:28 +0000 Subject: Convert some Into impls into From impls --- compiler/rustc_errors/src/diagnostic.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'compiler/rustc_errors/src') diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index 05b9cbfbc06..afce877547f 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -156,9 +156,9 @@ impl IntoDiagArg for DiagArgValue { } } -impl Into> for DiagArgValue { - fn into(self) -> FluentValue<'static> { - match self { +impl From for FluentValue<'static> { + fn from(val: DiagArgValue) -> Self { + match val { DiagArgValue::Str(s) => From::from(s), DiagArgValue::Number(n) => From::from(n), DiagArgValue::StrListSepByAnd(l) => fluent_value_from_str_list_sep_by_and(l), -- cgit 1.4.1-3-g733a5