ixmilia / dxf-rs

MIT License
95 stars 29 forks source link

`crate::helper_functions::read_line` doesn't use None #49

Closed mrghosti3 closed 1 year ago

mrghosti3 commented 1 year ago

A function in crate::helper_functions::read_line is only returning Some(...) which wraps either Ok(...) or Err(...) values.

https://github.com/ixmilia/dxf-rs/blob/ac90acbf0a94df63546f34f5b607d4d6c4de9054/src/helper_functions.rs#L302

All returns:

https://github.com/ixmilia/dxf-rs/blob/ac90acbf0a94df63546f34f5b607d4d6c4de9054/src/helper_functions.rs#L312

https://github.com/ixmilia/dxf-rs/blob/ac90acbf0a94df63546f34f5b607d4d6c4de9054/src/helper_functions.rs#L330

https://github.com/ixmilia/dxf-rs/blob/ac90acbf0a94df63546f34f5b607d4d6c4de9054/src/helper_functions.rs#L337

We can forgo the Option enum wrapping and instantly return Result enum as I have done in PR #48.

mrghosti3 commented 1 year ago

Fixed since PR #48 is merged.