aboutsummaryrefslogtreecommitdiff
path: root/src/rust
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-10-30 09:33:36 -0400
committerNick Mathewson <nickm@torproject.org>2018-10-30 09:33:36 -0400
commit038bc21f8894043fbdda0cc87adddfbad84f65c4 (patch)
treebe7e2efd56f5c1ff1580c1baf9eec7d8c0c54f8d /src/rust
parent8013e3e8b6af4170f622765a0fb1a219131028bd (diff)
parent80ad15921cef42ac12da356584f217d2ead5cb09 (diff)
downloadtor-038bc21f8894043fbdda0cc87adddfbad84f65c4.tar.gz
tor-038bc21f8894043fbdda0cc87adddfbad84f65c4.zip
Merge remote-tracking branch 'tor-github/pr/346' into maint-0.3.3
Diffstat (limited to 'src/rust')
-rw-r--r--src/rust/protover/ffi.rs13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/rust/protover/ffi.rs b/src/rust/protover/ffi.rs
index 8d9f4b8741..f0216f157b 100644
--- a/src/rust/protover/ffi.rs
+++ b/src/rust/protover/ffi.rs
@@ -204,8 +204,7 @@ pub extern "C" fn protover_get_supported_protocols() -> *const c_char {
#[no_mangle]
pub extern "C" fn protover_compute_vote(
list: *const Stringlist,
- threshold: c_int,
- allow_long_proto_names: bool,
+ threshold: c_int
) -> *mut c_char {
if list.is_null() {
@@ -220,13 +219,9 @@ pub extern "C" fn protover_compute_vote(
let mut proto_entries: Vec<UnvalidatedProtoEntry> = Vec::new();
for datum in data {
- let entry: UnvalidatedProtoEntry = match allow_long_proto_names {
- true => match UnvalidatedProtoEntry::from_str_any_len(datum.as_str()) {
- Ok(n) => n,
- Err(_) => continue},
- false => match datum.parse() {
- Ok(n) => n,
- Err(_) => continue},
+ let entry: UnvalidatedProtoEntry = match datum.parse() {
+ Ok(n) => n,
+ Err(_) => continue
};
proto_entries.push(entry);
}