rust-ini icon indicating copy to clipboard operation
rust-ini copied to clipboard

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

Open WindSoilder opened this issue 2 years ago • 0 comments

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.

WindSoilder avatar May 26 '23 08:05 WindSoilder