aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-10-30 09:35:11 -0400
committerNick Mathewson <nickm@torproject.org>2018-10-30 09:35:11 -0400
commit6ba7f9f0a42ff2a55b2e66998b4ebf55c90b2787 (patch)
tree6a09c82b0d370cc1535086b5434dc0f5b5aa7d82 /src
parent30d853a9067e866312e475f42fb6063718591af8 (diff)
parent3a05b5acdc4a40eae6016ab94067bf5dde92e5fe (diff)
downloadtor-6ba7f9f0a42ff2a55b2e66998b4ebf55c90b2787.tar.gz
tor-6ba7f9f0a42ff2a55b2e66998b4ebf55c90b2787.zip
Merge branch 'maint-0.3.5'
Diffstat (limited to 'src')
-rw-r--r--src/rust/protover/ffi.rs19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/rust/protover/ffi.rs b/src/rust/protover/ffi.rs
index f17f30127d..ac149fbbbc 100644
--- a/src/rust/protover/ffi.rs
+++ b/src/rust/protover/ffi.rs
@@ -187,11 +187,7 @@ pub extern "C" fn protover_get_supported_protocols() -> *const c_char {
//
// Why is the threshold a signed integer? —isis
#[no_mangle]
-pub extern "C" fn protover_compute_vote(
- list: *const Stringlist,
- threshold: c_int,
- allow_long_proto_names: bool,
-) -> *mut c_char {
+pub extern "C" fn protover_compute_vote(list: *const Stringlist, threshold: c_int) -> *mut c_char {
if list.is_null() {
return allocate_and_copy_string("");
}
@@ -203,16 +199,9 @@ pub extern "C" fn protover_compute_vote(
let mut proto_entries: Vec<UnvalidatedProtoEntry> = Vec::new();
for datum in data {
- let entry: UnvalidatedProtoEntry = if allow_long_proto_names {
- match UnvalidatedProtoEntry::from_str_any_len(datum.as_str()) {
- Ok(n) => n,
- Err(_) => continue,
- }
- } else {
- match datum.parse() {
- Ok(n) => n,
- Err(_) => continue,
- }
+ let entry: UnvalidatedProtoEntry = match datum.parse() {
+ Ok(n) => n,
+ Err(_) => continue,
};
proto_entries.push(entry);
}