Convert all assert!s not documented as panics into debug_assert!s.
Document the rest.
This commit is contained in:
parent
ee6c1f34b3
commit
b2c2214725
|
@ -63,6 +63,9 @@ pub trait PcapSink {
|
|||
/// Write the libpcap packet header into the sink.
|
||||
///
|
||||
/// See also the note for [global_header](#method.global_header).
|
||||
///
|
||||
/// # Panics
|
||||
/// This function panics if `length` is greater than 65535.
|
||||
fn packet_header(&self, timestamp: u64, length: usize) {
|
||||
assert!(length <= 65535);
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ impl Contig {
|
|||
}
|
||||
|
||||
fn shrink_hole_to(&mut self, size: usize) {
|
||||
assert!(self.hole_size >= size);
|
||||
debug_assert!(self.hole_size >= size);
|
||||
|
||||
let total_size = self.total_size();
|
||||
self.hole_size = size;
|
||||
|
|
Loading…
Reference in New Issue