Преглед на файлове

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