浏览代码

Utilize type param in method invocation.

Corey Farwell 6 年之前
父节点
当前提交
6d2e4dea10
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      src/rust/protover/ffi.rs

+ 1 - 4
src/rust/protover/ffi.rs

@@ -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,
     }