浏览代码

use shorthand struct initialization

Liam Kinne 10 月之前
父节点
当前提交
0450ba3154
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/wire/ip.rs

+ 1 - 1
src/wire/ip.rs

@@ -391,7 +391,7 @@ pub struct Endpoint {
 impl Endpoint {
     /// Create an endpoint address from given address and port.
     pub const fn new(addr: Address, port: u16) -> Endpoint {
-        Endpoint { addr: addr, port }
+        Endpoint { addr, port }
     }
 }