]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
rust: Refactor Rust implementation of protover_is_supported_here().
authorIsis Lovecruft <isis@torproject.org>
Wed, 21 Mar 2018 03:08:35 +0000 (03:08 +0000)
committerIsis Lovecruft <isis@torproject.org>
Mon, 2 Apr 2018 19:20:35 +0000 (19:20 +0000)
It was changed to take borrows instead of taking ownership.

 * REFACTOR `protover::ffi::protover_is_supported_here()` to use changed method
   signature on `protover::is_supported_here()`.

src/rust/protover/ffi.rs

index 780fe6963bcb03abad3de41f8b0c00fb3306a8a3..44c65114e33a5afd82a00136a93e3f83efc4c616 100644 (file)
@@ -204,7 +204,7 @@ pub extern "C" fn protover_is_supported_here(
         Err(_) => return 0,
     };
 
-    let is_supported = is_supported_here(protocol, version);
+    let is_supported = is_supported_here(&protocol, &version);
 
     return if is_supported { 1 } else { 0 };
 }