[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #25727 [Core Tor/Tor]: Add bool types to Rust coding standards guidelines
#25727: Add bool types to Rust coding standards guidelines
------------------------------+-------------------------------------
Reporter: isis | Owner: isis
Type: enhancement | Status: assigned
Priority: Medium | Milestone: Tor: 0.3.4.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Keywords: torspec, rust, fast-fix
Actual Points: | Parent ID:
Points: .1 | Reviewer:
Sponsor: SponsorM-can |
------------------------------+-------------------------------------
Similar to #25368, we can once again expand upon which Rust types are safe
to send over the FFI boundary without
conversion/serialisation/translation, because Rust's `bool` type and C99's
`bool` type are directly compatible. (I think this also makes an even
larger argument moving forward for using `bool`s in C wherever it makes
sense, since otherwise we need to convert between the libc `uint8_t` type
and the native `u8` in Rust.)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25727>
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