From 13230db68c3cb2842f23f95fc1b47fd989e6277d Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 7 Oct 2020 19:28:34 +0200 Subject: =?UTF-8?q?Fix=20some=20clippy=20warnings=20=E2=9C=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/syntax/ast/lit.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/syntax') diff --git a/src/syntax/ast/lit.rs b/src/syntax/ast/lit.rs index 31566e89..4370345a 100644 --- a/src/syntax/ast/lit.rs +++ b/src/syntax/ast/lit.rs @@ -36,7 +36,7 @@ pub enum Lit { } /// A dictionary literal: `(false, 12cm, greeting = "hi")`. -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Default, Clone, PartialEq)] pub struct LitDict(pub Vec); /// An entry in a dictionary literal: `false` or `greeting = "hi"`. @@ -51,6 +51,6 @@ pub struct LitDictEntry { impl LitDict { /// Create an empty dict literal. pub fn new() -> Self { - Self(vec![]) + Self::default() } } -- cgit v1.2.3