diff --git a/src/cat/cat.rs b/src/cat/cat.rs index c1a81bf05..90db91ee8 100644 --- a/src/cat/cat.rs +++ b/src/cat/cat.rs @@ -320,6 +320,9 @@ impl<'a, W: Write> UnsafeWriter<'a, W> { } } +// This method was used in Write::write only. It must not be called in the correct cat code +// and is placed in the bottleneck place, so it is not used anymore. +// Uncomment this and code in Write::write for more convenient testing of a new cat version. //#[inline(never)] //fn fail() -> ! { // panic!("assertion failed"); @@ -329,8 +332,8 @@ impl<'a, W: Write> Write for UnsafeWriter<'a, W> { fn write(&mut self, buf: &[u8]) -> Result { //let dst = &mut self.buf[self.pos..]; let len = buf.len(); - // assertion is true for current code - // and it is a bottlneck place + // the condition is false for current code and every correct code + // see fail method comment for more information // if len > dst.len() { // fail(); // }