From ca706a494b38dc34785124ee9c2cbe2ff1c6b323 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 28 Mar 2024 13:32:28 -0500 Subject: [PATCH] refactor(toml): Be consistent in how we initialize warnings This resolves feedback from #13664 --- src/cargo/util/toml/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cargo/util/toml/mod.rs b/src/cargo/util/toml/mod.rs index 523447d3263..cdd92a478a6 100644 --- a/src/cargo/util/toml/mod.rs +++ b/src/cargo/util/toml/mod.rs @@ -48,8 +48,8 @@ pub fn read_manifest( source_id: SourceId, gctx: &GlobalContext, ) -> CargoResult { - let mut warnings = vec![]; - let mut errors = vec![]; + let mut warnings = Default::default(); + let mut errors = Default::default(); let contents = read_toml_string(path, gctx).map_err(|err| ManifestError::new(err, path.into()))?;