[tor-bugs] #17824 [metrics-lib]: switch on string instead of many if-else with String comparison

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Dec 22 21:23:09 UTC 2015


#17824: switch on string instead of many if-else with String comparison
-------------------------+------------------------------
 Reporter:  iwakeh       |          Owner:  karsten
     Type:  enhancement  |         Status:  needs_review
 Priority:  Low          |      Milestone:
Component:  metrics-lib  |        Version:
 Severity:  Minor        |     Resolution:
 Keywords:               |  Actual Points:
Parent ID:  #17822       |         Points:
  Sponsor:               |
-------------------------+------------------------------

Comment (by iwakeh):

 Thanks for making all these changes!

 I found some more places where I find the switch-statement more readable
 and attached a patch based on your public repo.

 Please review and if there is a problem it would be great to add a test
 that the patch fails.

 To change DescriptorImpl could cause a bigger rewrite and it is better not
 to include it now.
 But it might be a good idea to keep an issue around for cleaning it up
 next year?

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/17824#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list