Explorar o código

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

Lint: use shorthand struct initialization
Dario Nieuwenhuis hai 10 meses
pai
achega
a2a0dfb2c3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 }
     }
 }