]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Utilize type param in method invocation.
authorCorey Farwell <coreyf@rwell.org>
Mon, 25 Jun 2018 02:45:07 +0000 (22:45 -0400)
committerCorey Farwell <coreyf@rwell.org>
Mon, 25 Jun 2018 02:45:07 +0000 (22:45 -0400)
src/rust/protover/ffi.rs

index ba156cb1ba485427f52a955dba3fe60d1f1a8d68..40a7354cbf6fdde13132fbfb994e29824861c9fb 100644 (file)
@@ -129,10 +129,7 @@ pub extern "C" fn protover_contains_long_protocol_names_(
         Err(_) => return 1
     };
 
-    let protocol_entry : Result<UnvalidatedProtoEntry,_> =
-        protocol_list.parse();
-
-    match protocol_entry {
+    match protocol_list.parse::<UnvalidatedProtoEntry>() {
         Ok(_) => 0,
         Err(_) => 1,
     }