Skip to content

Commit

Permalink
refactor(toml): Be consistent in how we initialize warnings
Browse files Browse the repository at this point in the history
This resolves feedback from rust-lang#13664
  • Loading branch information
epage committed Mar 28, 2024
1 parent 8a74899 commit ca706a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cargo/util/toml/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ pub fn read_manifest(
source_id: SourceId,
gctx: &GlobalContext,
) -> CargoResult<EitherManifest> {
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()))?;
Expand Down

0 comments on commit ca706a4

Please sign in to comment.