Browse Source

Clippy prefers From instead of Into (#1208)

pull/1209/head
João Borges 3 years ago committed by GitHub
parent
commit
ee6c98ca92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      boa/src/syntax/ast/node/declaration/mod.rs

6
boa/src/syntax/ast/node/declaration/mod.rs

@ -183,9 +183,9 @@ impl From<DeclarationList> for Node {
}
}
impl Into<Box<[Declaration]>> for Declaration {
fn into(self) -> Box<[Declaration]> {
Box::new([self])
impl From<Declaration> for Box<[Declaration]> {
fn from(d: Declaration) -> Self {
Box::new([d])
}
}

Loading…
Cancel
Save