소스 검색

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