Skip to content

Commit

Permalink
Merge branch 'master' into bind/foundry-rs#991-rng-seeding
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Jul 28, 2022
2 parents 7a2dbe5 + 878c1dc commit e31087f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,20 @@ impl Config {
Ok(config) => config,
Err(errors) => {
// providers can be nested and can return duplicate errors
let errors: BTreeSet<_> =
errors.into_iter().map(|err| format!("config error: {}", err)).collect();
let errors: BTreeSet<_> = errors
.into_iter()
.map(|err| {
if err
.metadata
.as_ref()
.map(|meta| meta.name.contains(Toml::NAME))
.unwrap_or_default()
{
return format!("foundry.toml error: {}", err)
}
format!("foundry config error: {}", err)
})
.collect();
for error in errors {
eprintln!("{}", error);
}
Expand Down

0 comments on commit e31087f

Please sign in to comment.