[tor-commits] [tor/master] Refactor purpose_needs_anonymity to use switch statement