Update an obsolete comment about conditions
This commit is contained in:
parent
e415c25bcd
commit
7619b78191
@ -237,7 +237,7 @@ impl<'a> BufWriter<'a> {
|
|||||||
|
|
||||||
impl<'a> Writer for BufWriter<'a> {
|
impl<'a> Writer for BufWriter<'a> {
|
||||||
fn write(&mut self, buf: &[u8]) -> IoResult<()> {
|
fn write(&mut self, buf: &[u8]) -> IoResult<()> {
|
||||||
// raises a condition if the entire write does not fit in the buffer
|
// return an error if the entire write does not fit in the buffer
|
||||||
let max_size = self.buf.len();
|
let max_size = self.buf.len();
|
||||||
if self.pos >= max_size || (self.pos + buf.len()) > max_size {
|
if self.pos >= max_size || (self.pos + buf.len()) > max_size {
|
||||||
return Err(IoError {
|
return Err(IoError {
|
||||||
|
Loading…
Reference in New Issue
Block a user