ruby / net-imap

Ruby client api for Internet Message Access Protocol
https://ruby.github.io/net-imap
Other
56 stars 29 forks source link

Remove redundant calls in sort_internal and thread_internal #251

Closed gobijan closed 9 months ago

gobijan commented 9 months ago

sort_internal and thread_internal have an else statement that can be removed because normalize_searching_criteria(search_keys) is called anyways after the case.

nevans commented 9 months ago

Thanks! I was looking at the normalize_searching_criteria code just last night, in order to finish up a PR for #115, and I was puzzling over why it might be called twice like that! I hadn't realized there was a PR waiting to fix it. 😆 Maybe it was an accident during 080bd612? It's lasted twenty years!

Could you update your PR to match the style search_internal? We don't need to normalize_searching_criteria at all when the criteria is just RawData.

gobijan commented 9 months ago

Done. 20 years in software is quite some time! :)