mirror of
https://github.com/uutils/coreutils
synced 2024-12-18 00:53:25 +00:00
Fixed and made the comments clearer
This commit is contained in:
parent
dd16c58ab4
commit
2060048c79
1 changed files with 5 additions and 2 deletions
|
@ -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<usize> {
|
||||
//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();
|
||||
// }
|
||||
|
|
Loading…
Reference in a new issue