zonyitoo / rust-ini

INI file parser in Rust
MIT License
298 stars 76 forks source link

Deduplicate eof error handling #127

Closed GnomedDev closed 5 months ago

GnomedDev commented 5 months ago

This also removes the anti-pattern of Option::is_none() -> Option::unwrap().

Sadly I had to split out eof_error into a different function as otherwise llvm will forget all about the [cold] attribute.