From ee6c98ca9244d11a424c2e6107db5bb4fd13571e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Borges?= Date: Tue, 13 Apr 2021 22:56:48 +0100 Subject: [PATCH] Clippy prefers From instead of Into (#1208) --- boa/src/syntax/ast/node/declaration/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boa/src/syntax/ast/node/declaration/mod.rs b/boa/src/syntax/ast/node/declaration/mod.rs index c05fe5084f..b63fb4c8d7 100644 --- a/boa/src/syntax/ast/node/declaration/mod.rs +++ b/boa/src/syntax/ast/node/declaration/mod.rs @@ -183,9 +183,9 @@ impl From for Node { } } -impl Into> for Declaration { - fn into(self) -> Box<[Declaration]> { - Box::new([self]) +impl From for Box<[Declaration]> { + fn from(d: Declaration) -> Self { + Box::new([d]) } }