Skip to content

Writing 0 bytes to a full buffer results in an error #15583

Closed
@arjantop

Description

@arjantop
use std::io::BufWriter;

fn main() {
    let mut buf = [0u8, ..5];
    let mut writer = BufWriter::new(buf);
    writer.write([1, 2, 3, 4, 5]).unwrap();
    writer.write([]).unwrap();
}

http://is.gd/1lwQuf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions