rusticata / x509-parser

X.509 parser written in pure Rust. Fast, zero-copy, safe.
Other
207 stars 67 forks source link

Use a single impl block per type #64

Closed djc closed 3 years ago

djc commented 3 years ago

Here's another thing that I found a little confusing, having multiple impl blocks per type. I find this version easier to reason about (but feel free to disagree).

chifflier commented 3 years ago

I agree, this is easier to read. For the record, the code was originally split because I though many functions, use statements and code would have to be marked with #[cfg(feature = "verify")] and wanted to factorize that. It appears the amount of code was not that important.

chifflier commented 3 years ago

Merged, thanks for your work and ideas!