From e149be492d7cd02918a189c10209e893e6d4c43c Mon Sep 17 00:00:00 2001 From: dokaptur Date: Tue, 25 Nov 2014 18:55:48 +0100 Subject: [PATCH] tail: print bytes as char instead of u8 --- src/tail/tail.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tail/tail.rs b/src/tail/tail.rs index 06cb28c99..e6a0515fc 100644 --- a/src/tail/tail.rs +++ b/src/tail/tail.rs @@ -234,7 +234,7 @@ fn tail_lines(reader: &mut BufferedReader, mut line_count: uint, b #[inline] fn tail_bytes(reader: &mut BufferedReader, mut byte_count: uint, beginning: bool) { - let mut ringbuf: RingBuf = RingBuf::new(); + let mut ringbuf: RingBuf = RingBuf::new(); let mut bytes = reader.bytes().skip( if beginning { let temp = byte_count; @@ -250,7 +250,7 @@ fn tail_bytes(reader: &mut BufferedReader, mut byte_count: uint, b if byte_count <= ringbuf.len() { ringbuf.pop_front(); } - ringbuf.push_back(byte); + ringbuf.push_back(byte as char); } Err(err) => panic!(err) }