aboutsummaryrefslogtreecommitdiff
path: root/src/rust/external/external.rs
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-08-16 08:43:05 -0400
committerNick Mathewson <nickm@torproject.org>2018-08-16 08:43:05 -0400
commitc8aecd14fecc55f5d8a48f793c24e3df68f1483c (patch)
treec6079bdecc7c06231bde2e04fed3a5b32f5aaf99 /src/rust/external/external.rs
parent7e50d43f07180c13adbeb0a9f1394490f3c679bb (diff)
parent6b609ce4356423a28e7b421a9f09849d831a0c6f (diff)
downloadtor-c8aecd14fecc55f5d8a48f793c24e3df68f1483c.tar.gz
tor-c8aecd14fecc55f5d8a48f793c24e3df68f1483c.zip
Merge branch 'pr275_squashed'
Diffstat (limited to 'src/rust/external/external.rs')
-rw-r--r--src/rust/external/external.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/rust/external/external.rs b/src/rust/external/external.rs
index 059fdd0df7..874c7c3153 100644
--- a/src/rust/external/external.rs
+++ b/src/rust/external/external.rs
@@ -5,10 +5,7 @@ use libc::{c_char, c_int};
use std::ffi::CString;
extern "C" {
- fn tor_version_as_new_as(
- platform: *const c_char,
- cutoff: *const c_char,
- ) -> c_int;
+ fn tor_version_as_new_as(platform: *const c_char, cutoff: *const c_char) -> c_int;
}
/// Wrap calls to tor_version_as_new_as, defined in routerparse.c
@@ -25,9 +22,7 @@ pub fn c_tor_version_as_new_as(platform: &str, cutoff: &str) -> bool {
Err(_) => return false,
};
- let result: c_int = unsafe {
- tor_version_as_new_as(c_platform.as_ptr(), c_cutoff.as_ptr())
- };
+ let result: c_int = unsafe { tor_version_as_new_as(c_platform.as_ptr(), c_cutoff.as_ptr()) };
result == 1
}