Convert all assert!s not documented as panics into debug_assert!s.

Document the rest.
This commit is contained in:
whitequark 2017-12-22 20:35:16 +00:00
parent ee6c1f34b3
commit b2c2214725
2 changed files with 4 additions and 1 deletions

View File

@ -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);

View File

@ -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;