nickspring / charset-normalizer-rs

Truly universal encoding detector in pure Rust - port of Python version
https://crates.io/crates/charset-normalizer-rs
MIT License
30 stars 3 forks source link

md fixes #30

Closed chris-ha458 closed 1 year ago

chris-ha458 commented 1 year ago

Strips should_strip_sig_or_bom some blackmagic boolean logic 4899bf3

I doubled checked this with pen and paper, and tests all pass But still it would be a good idea to get another set of eyes here.

chris-ha458 commented 1 year ago

i kept the clippy error messages. If it is true that atleast in rust that should_strip_sig_or_bom always returns true, strip_sig_or_bom is always equal to bom_or_sig_available. This means that bom_or_sig_available && !strip_sig_or_bom becomes bom_or_sig_available && !bom_or_sig_available which is always false. this occurs twice and clippy did not find them before but could find them with these commits.

nickspring commented 1 year ago

Strips should_strip_sig_or_bom some blackmagic boolean logic 4899bf3

I doubled checked this with pen and paper, and tests all pass But still it would be a good idea to get another set of eyes here.

Don't see it in changes, only in commit. It looks correct.