[tor-bugs] #27741 [Core Tor/Tor]: too many arguments in rust protover_compute_vote()

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Oct 17 01:12:07 UTC 2018


#27741: too many arguments in rust protover_compute_vote()
-------------------------------------------------+-------------------------
 Reporter:  cyberpunks                           |          Owner:  nickm
     Type:  defect                               |         Status:
                                                 |  needs_review
 Priority:  Very High                            |      Milestone:  Tor:
                                                 |  0.3.5.x-final
Component:  Core Tor/Tor                         |        Version:  Tor:
                                                 |  0.3.3.6
 Severity:  Normal                               |     Resolution:
 Keywords:  035-must, protover, memory-safety,   |  Actual Points:
  033-backport, 034-backport                     |
Parent ID:  #27739                               |         Points:
 Reviewer:  teor                                 |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by cyberpunks):

 rustfmt actually says the `bug27741_033` branch should put the function
 arguments all in one line, since they fit within 100 characters now.

 {{{
 +pub extern "C" fn protover_compute_vote(list: *const Stringlist,
 threshold: c_int) -> *mut c_char {
 }}}
 Also that there shouldn't be a double space in the match statement `Ok(n)
 => n,` and there should be a comma after `continue,`.

 {{{
 -            Ok(n)  => n,
 -            Err(_) => continue
 +            Ok(n) => n,
 +            Err(_) => continue,
 }}}

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


More information about the tor-bugs mailing list