소스 검색

Merge pull request #938 from umi-eng/lint/shorthand-struct-init

Lint: use shorthand struct initialization
Dario Nieuwenhuis 10 달 전
부모
커밋
a2a0dfb2c3
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 }
     }
 }