From 44f851cbea0708a082756e7a0aa46006a938306e Mon Sep 17 00:00:00 2001 From: Zekun Wang Date: Wed, 2 Oct 2024 14:30:14 -0400 Subject: [PATCH] lint --- third_party/move/move-compiler/src/expansion/translate.rs | 6 +++--- third_party/move/move-model/src/metadata.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/third_party/move/move-compiler/src/expansion/translate.rs b/third_party/move/move-compiler/src/expansion/translate.rs index ad54e672a661e..12cc0f80cc2af 100644 --- a/third_party/move/move-compiler/src/expansion/translate.rs +++ b/third_party/move/move-compiler/src/expansion/translate.rs @@ -2675,7 +2675,8 @@ fn exp_(context: &mut Context, sp!(loc, pe_): P::Exp) -> E::Exp { EE::Name(module_access.clone(), ty_opt.clone()), ); // t, let t = e; - let (t, bind) = let_symbol_eq_exp(er.loc, Symbol::from("$t"), *er); + let (t, bind) = + let_symbol_eq_exp(er.loc, Symbol::from("$t"), *er); // x + t; let rhs_expanded = sp(loc, EE::BinopExp(Box::new(x), op, Box::new(t))); @@ -2735,8 +2736,7 @@ fn exp_(context: &mut Context, sp!(loc, pe_): P::Exp) -> E::Exp { Some(op) => { let lhs_loc = edotted.loc; // t2, let t2 = e2; - let (tmp2, bind2) = - let_symbol_eq_exp(er.loc, Symbol::from("$t2"), *er); + let (tmp2, bind2) = let_symbol_eq_exp(er.loc, Symbol::from("$t2"), *er); // e1.f let e = sp(lhs_loc, EE::ExpDotted(edotted)); // &mut e1.f diff --git a/third_party/move/move-model/src/metadata.rs b/third_party/move/move-model/src/metadata.rs index bf42d76068f62..c1a26833bffc8 100644 --- a/third_party/move/move-model/src/metadata.rs +++ b/third_party/move/move-model/src/metadata.rs @@ -215,9 +215,9 @@ impl FromStr for LanguageVersion { } } -impl Into for LanguageVersion { - fn into(self) -> CompilerLanguageVersion { - match self { +impl From for CompilerLanguageVersion { + fn from(val: LanguageVersion) -> Self { + match val { LanguageVersion::V1 => CompilerLanguageVersion::V1, LanguageVersion::V2_0 => CompilerLanguageVersion::V2_0, LanguageVersion::V2_1 => CompilerLanguageVersion::V2_1,