thegreathir 1 年之前
父节点
当前提交
5d432502e6
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      src/wire/ipsec_ah.rs

+ 4 - 2
src/wire/ipsec_ah.rs

@@ -187,14 +187,16 @@ impl<'a> Repr<'a> {
     /// Emit a high-level representation into an IPSec Authentication Header.
     pub fn emit<T: AsRef<[u8]> + AsMut<[u8]> + ?Sized>(&self, packet: &mut Packet<&'a mut T>) {
         packet.set_next_header(self.next_header);
-        
+
         let payload_len = (field::SEQUENCE_NUMBER.end + self.integrity_check_value.len() - 2) / 4;
         packet.set_payload_len(payload_len as u8);
 
         packet.clear_reserved();
         packet.set_security_parameters_index(self.security_parameters_index);
         packet.set_sequence_number(self.sequence_number);
-        packet.integrity_check_value_mut().copy_from_slice(self.integrity_check_value);
+        packet
+            .integrity_check_value_mut()
+            .copy_from_slice(self.integrity_check_value);
     }
 }