@@ -21,7 +21,7 @@ impl Dhcp {
2121 let mut pkt = Packet :: with_capacity ( MIN_CAPACITY + capacity) ;
2222 let dhcp: Hdr < dhcp_hdr > = pkt. push_hdr ( ) ;
2323
24- pkt. get_mut_hdr ( & dhcp) . magic = MAGIC . to_be ( ) ;
24+ pkt. get_mut_hdr ( dhcp) . magic = MAGIC . to_be ( ) ;
2525
2626 Self {
2727 pkt,
@@ -35,73 +35,73 @@ impl Dhcp {
3535
3636 #[ must_use]
3737 pub fn op ( mut self , op : u8 ) -> Self {
38- self . pkt . get_mut_hdr ( & self . dhcp ) . op = op;
38+ self . pkt . get_mut_hdr ( self . dhcp ) . op = op;
3939 self
4040 }
4141
4242 #[ must_use]
4343 pub fn htype ( mut self , htype : u8 ) -> Self {
44- self . pkt . get_mut_hdr ( & self . dhcp ) . htype = htype;
44+ self . pkt . get_mut_hdr ( self . dhcp ) . htype = htype;
4545 self
4646 }
4747
4848 #[ must_use]
4949 pub fn hlen ( mut self , hlen : u8 ) -> Self {
50- self . pkt . get_mut_hdr ( & self . dhcp ) . hlen = hlen;
50+ self . pkt . get_mut_hdr ( self . dhcp ) . hlen = hlen;
5151 self
5252 }
5353
5454 #[ must_use]
5555 pub fn hops ( mut self , hops : u8 ) -> Self {
56- self . pkt . get_mut_hdr ( & self . dhcp ) . hops = hops;
56+ self . pkt . get_mut_hdr ( self . dhcp ) . hops = hops;
5757 self
5858 }
5959
6060 #[ must_use]
6161 pub fn xid ( mut self , xid : u32 ) -> Self {
62- self . pkt . get_mut_hdr ( & self . dhcp ) . xid = xid. to_be ( ) ;
62+ self . pkt . get_mut_hdr ( self . dhcp ) . xid = xid. to_be ( ) ;
6363 self
6464 }
6565
6666 #[ must_use]
6767 pub fn secs ( mut self , secs : u16 ) -> Self {
68- self . pkt . get_mut_hdr ( & self . dhcp ) . secs = secs. to_be ( ) ;
68+ self . pkt . get_mut_hdr ( self . dhcp ) . secs = secs. to_be ( ) ;
6969 self
7070 }
7171
7272 #[ must_use]
7373 pub fn flags ( mut self , flags : u16 ) -> Self {
74- self . pkt . get_mut_hdr ( & self . dhcp ) . flags = flags. to_be ( ) ;
74+ self . pkt . get_mut_hdr ( self . dhcp ) . flags = flags. to_be ( ) ;
7575 self
7676 }
7777
7878 #[ must_use]
7979 pub fn ciaddr ( mut self , ciaddr : u32 ) -> Self {
80- self . pkt . get_mut_hdr ( & self . dhcp ) . ciaddr = ciaddr. to_be ( ) ;
80+ self . pkt . get_mut_hdr ( self . dhcp ) . ciaddr = ciaddr. to_be ( ) ;
8181 self
8282 }
8383
8484 #[ must_use]
8585 pub fn yiaddr ( mut self , yiaddr : u32 ) -> Self {
86- self . pkt . get_mut_hdr ( & self . dhcp ) . yiaddr = yiaddr. to_be ( ) ;
86+ self . pkt . get_mut_hdr ( self . dhcp ) . yiaddr = yiaddr. to_be ( ) ;
8787 self
8888 }
8989
9090 #[ must_use]
9191 pub fn siaddr ( mut self , siaddr : u32 ) -> Self {
92- self . pkt . get_mut_hdr ( & self . dhcp ) . siaddr = siaddr. to_be ( ) ;
92+ self . pkt . get_mut_hdr ( self . dhcp ) . siaddr = siaddr. to_be ( ) ;
9393 self
9494 }
9595
9696 #[ must_use]
9797 pub fn giaddr ( mut self , giaddr : u32 ) -> Self {
98- self . pkt . get_mut_hdr ( & self . dhcp ) . giaddr = giaddr. to_be ( ) ;
98+ self . pkt . get_mut_hdr ( self . dhcp ) . giaddr = giaddr. to_be ( ) ;
9999 self
100100 }
101101
102102 #[ must_use]
103103 pub fn chaddr < T : AsRef < [ u8 ] > > ( mut self , chaddr : T ) -> Self {
104- let dhcp = self . pkt . get_mut_hdr ( & self . dhcp ) ;
104+ let dhcp = self . pkt . get_mut_hdr ( self . dhcp ) ;
105105 let buf = chaddr. as_ref ( ) ;
106106 let cplen = std:: cmp:: min ( buf. len ( ) , dhcp. chaddr . len ( ) ) ;
107107 dhcp. chaddr [ ..cplen] . copy_from_slice ( & buf[ ..cplen] ) ;
@@ -110,7 +110,7 @@ impl Dhcp {
110110
111111 #[ must_use]
112112 pub fn sname < T : AsRef < [ u8 ] > > ( mut self , sname : T ) -> Self {
113- let dhcp = self . pkt . get_mut_hdr ( & self . dhcp ) ;
113+ let dhcp = self . pkt . get_mut_hdr ( self . dhcp ) ;
114114 let buf = sname. as_ref ( ) ;
115115 let cplen = std:: cmp:: min ( buf. len ( ) , dhcp. sname . len ( ) ) ;
116116 dhcp. sname [ ..cplen] . copy_from_slice ( & buf[ ..cplen] ) ;
@@ -119,7 +119,7 @@ impl Dhcp {
119119
120120 #[ must_use]
121121 pub fn file < T : AsRef < [ u8 ] > > ( mut self , file : T ) -> Self {
122- let dhcp = self . pkt . get_mut_hdr ( & self . dhcp ) ;
122+ let dhcp = self . pkt . get_mut_hdr ( self . dhcp ) ;
123123 let buf = file. as_ref ( ) ;
124124 let cplen = std:: cmp:: min ( buf. len ( ) , dhcp. file . len ( ) ) ;
125125 dhcp. file [ ..cplen] . copy_from_slice ( & buf[ ..cplen] ) ;
@@ -128,7 +128,7 @@ impl Dhcp {
128128
129129 #[ must_use]
130130 pub fn magic ( mut self , magic : u32 ) -> Self {
131- self . pkt . get_mut_hdr ( & self . dhcp ) . magic = magic. to_be ( ) ;
131+ self . pkt . get_mut_hdr ( self . dhcp ) . magic = magic. to_be ( ) ;
132132 self
133133 }
134134
0 commit comments