Skip to content

Commit

Permalink
Add Travis build status to README.
Browse files Browse the repository at this point in the history
Tweak the example while I'm here.
  • Loading branch information
Freaky committed Apr 22, 2018
1 parent 97fa3d7 commit 42a6e4b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
LineReader
----------
# LineReader [![Build Status](https://travis-ci.org/Freaky/rust-linereader.svg?branch=master)](https://travis-ci.org/Freaky/rust-linereader)
A fast line-oriented reader for Rust.

## Summary
Expand All @@ -13,7 +12,8 @@ raw u8's, including the delimiter, and nothing more.

Lines are limited to the size of the internal buffer (default 1MB).

No crate or anything yet - I want a test suite first.
extern crate linereader;
use linereader::LineReader;

// Note BufReader will result in unnecessary copying, so, er, don't do that.
let mut file = File::open(myfile).expect("open");
Expand All @@ -24,7 +24,8 @@ No crate or anything yet - I want a test suite first.
let reader = LineReader::new(file);

while let Some(line) = reader.next_line() {
line.expect("oh noes, an IO error");
let line = line.expect("oh noes, an IO error");
// line is a &[u8] owned by reader.
}

## Performance
Expand Down

0 comments on commit 42a6e4b

Please sign in to comment.