diff --git a/Cargo.lock b/Cargo.lock index 499a386..73b1d99 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,7 +13,7 @@ dependencies = [ [[package]] name = "config" -version = "0.1.5" +version = "0.1.6" dependencies = [ "regex", "toml", diff --git a/Cargo.toml b/Cargo.toml index 1b436db..270deed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "config" -version = "0.1.5" +version = "0.1.6" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/main.rs b/src/main.rs index ec1d33c..a36ecfc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -73,8 +73,10 @@ fn main() -> Result<(), Box>{ section = sub.unwrap(); } } - for key in section.keys() { - println!("{}", key); + for (key, value) in section.iter() { + if value.is_table() { + println!("{}", key); + } } return Ok(()); }