summaryrefslogtreecommitdiff
path: root/src/rust/protover/ffi.rs
diff options
context:
space:
mode:
authorChelsea Holland Komlo <me@chelseakomlo.com>2017-11-11 22:26:22 -0500
committerChelsea Holland Komlo <me@chelseakomlo.com>2017-11-11 23:19:34 -0500
commit1c50331b9af28a691cb48e632ab71d9af83916ba (patch)
treee8716f521e6a1d5237a8bedbb877b9359a69a7ff /src/rust/protover/ffi.rs
parent11eaf208c0aaa7c252ead6343ea65a3576227d69 (diff)
downloadtor-1c50331b9af28a691cb48e632ab71d9af83916ba.tar.gz
tor-1c50331b9af28a691cb48e632ab71d9af83916ba.zip
annotate where C and Rust need to stay in sync
Diffstat (limited to 'src/rust/protover/ffi.rs')
-rw-r--r--src/rust/protover/ffi.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rust/protover/ffi.rs b/src/rust/protover/ffi.rs
index cebf9e12fa..3eb22c933e 100644
--- a/src/rust/protover/ffi.rs
+++ b/src/rust/protover/ffi.rs
@@ -15,7 +15,8 @@ use tor_allocate::allocate_and_copy_string;
/// Translate C enums to Rust Proto enums, using the integer value of the C
/// enum to map to its associated Rust enum
-/// This is dependant on the associated C enum preserving ordering.
+///
+/// C_RUST_COUPLED: src/or/protover.h `protocol_type_t`
fn translate_to_rust(c_proto: uint32_t) -> Result<Proto, &'static str> {
match c_proto {
0 => Ok(Proto::Link),