Skip to content

core::io cleanup #2004

@catamorphism

Description

@catamorphism
Contributor

Address FIXMEs in core::io:

  • Unbuffered operations?
  • Make seekable orthogonal
  • In reader::read_chars(), handle the case where eof occurs in the middle of a Unicode char
  • In reader::read_char(), make sure it's valid to return -1
  • In reader::read_le_uint, deal with EOF
  • Improve forwarding implementation of reader
  • Restructure top-level stdin() and file_reader()
  • fileflags in buffered_file_writer()
  • Make stdin, stdout, stderr consts
  • Figure out why stdin() is different from stdout() and stderr()
  • Optimize mem_buffer::write()
  • Implement read_whole_file() in a low-level way
  • Improve fsync::FILE_res_sync()

Activity

ghost assigned on Mar 21, 2012
Dretch

Dretch commented on Nov 3, 2012

@Dretch
Contributor

In addition, io::WriterUtil has these methods but there are no corresponding read methods on io::ReaderUtil:

fn write_be_u64(n: u64);
fn write_be_u32(n: u32);
fn write_be_u16(n: u16);
fn write_be_i64(n: i64);
fn write_be_i32(n: i32);
fn write_be_i16(n: i16);
fn write_le_u64(n: u64);
fn write_le_u32(n: u32);
fn write_le_u16(n: u16);
fn write_le_i64(n: i64);
fn write_le_i32(n: i32);
fn write_le_i16(n: i16);
fn write_u8(n: u8);
added 2 commits that reference this issue on Dec 24, 2012
acertain

acertain commented on Feb 18, 2013

@acertain

Unbuffered operations please!

catamorphism

catamorphism commented on May 14, 2013

@catamorphism
ContributorAuthor

Nominating for milestone 2 (backwards-compatible).

kud1ing

kud1ing commented on May 21, 2013

@kud1ing

The proposed changes look similar to what Go offers:

graydon

graydon commented on May 30, 2013

@graydon
Contributor

closing as WONTFIX due to #4248 and specifically #6169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @graydon@kud1ing@catamorphism@acertain@Dretch

        Issue actions

          core::io cleanup · Issue #2004 · rust-lang/rust