This commit is contained in:
Jon Gjengset 2017-07-12 21:40:28 -04:00
parent eaafe61635
commit 57a3955925
No known key found for this signature in database
GPG Key ID: D64AC9D67176DC71
1 changed files with 30 additions and 32 deletions

View File

@ -65,8 +65,7 @@ fn main() {
// Figure out what accounts we have to deal with
let accounts: Vec<_> = match config.as_table() {
Some(t) => {
t.iter()
Some(t) => t.iter()
.filter_map(|(name, v)| match v.as_table() {
None => {
println!("Configuration for account {} is broken: not a table", name);
@ -97,8 +96,7 @@ fn main() {
})
}
})
.collect()
}
.collect(),
None => {
println!("Could not parse configuration file buzz.toml: not a table");
return;