[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #25628 [Core Tor/Tor]: Document our Rust coding standards for error/failure types



#25628: Document our Rust coding standards for error/failure types
------------------------------+--------------------------------
     Reporter:  isis          |      Owner:  (none)
         Type:  enhancement   |     Status:  new
     Priority:  Medium        |  Milestone:  Tor: 0.3.4.x-final
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  rust, tor-doc
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:  Sponsor8-can  |
------------------------------+--------------------------------
 Every crate which returns `Result<T, E>`s or `Option<T>` anywhere in its
 public interface should have an `errors.rs` module containing error types
 which implement either `Display` or `Debug`, and also `::failure::Fail`
 for making errors easier to work with between crates. See the `errors.rs`
 addition to the `protover` crate from #24031 for an example (doesn't have
 the `::failure::Fail` impl yet, because the failure crate is about to
 become 1.0.0 any day now).

 We should probably wait on this until failure is 1.0.0.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25628>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs