zonyitoo / rust-ini

INI file parser in Rust
MIT License
305 stars 79 forks source link

Maybe it should returns error when there are lines without `=` #106

Open WindSoilder opened 1 year ago

WindSoilder commented 1 year ago

given the following example:

use ini::Ini;
fn main() {
    let tmp = Ini::load_from_str(
        r#"
"[options]
PgpFetch
DevelSuffixes = -git"#,
    );
    println!("{tmp:?}");
}

Currently what it returns: Ok(Ini { sections: {None: Properties { data: {"\"[options]\nPgpFetch\nDevelSuffixes": "-git"} }} }). The first line doesn't contains =, I think it should returns error rather than return a property key which contains \n.