Skip to content

Commit bcf2802

Browse files
committed
---
yaml --- r: 62521 b: refs/heads/snap-stage3 c: d019e14 h: refs/heads/master i: 62519: bb7fba4 v: v3
1 parent 7f0b11e commit bcf2802

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 3a481c0f88025318eba7c48907a5c1d966e01d27
4+
refs/heads/snap-stage3: d019e145c033ac60d4413321da21d3e877b4b786
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libcore/io.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,25 +114,29 @@ pub trait Reader {
114114

115115
// FIXME (#2982): This should probably return an error.
116116
/**
117-
* Reads bytes and puts them into `bytes`. Returns the number of
118-
* bytes read.
117+
* Reads bytes and puts them into `bytes`, advancing the cursor. Returns the
118+
* number of bytes read.
119119
*
120120
* The number of bytes to be read is `len` or the end of the file,
121121
* whichever comes first.
122122
*
123123
* The buffer must be at least `len` bytes long.
124124
*
125+
* `read` is conceptually similar to C's `fread` function.
126+
*
125127
* # Examples
126128
*
127129
* None right now.
128130
*/
129131
fn read(&self, bytes: &mut [u8], len: uint) -> uint;
130132

131133
/**
132-
* Reads a single byte.
134+
* Reads a single byte, advancing the cursor.
133135
*
134136
* In the case of an EOF or an error, returns a negative value.
135137
*
138+
* `read_byte` is conceptually similar to C's `getc` function.
139+
*
136140
* # Examples
137141
*
138142
* None right now.
@@ -142,6 +146,8 @@ pub trait Reader {
142146
/**
143147
* Returns a boolean value: are we currently at EOF?
144148
*
149+
* `eof` is conceptually similar to C's `feof` function.
150+
*
145151
* # Examples
146152
*
147153
* None right now.
@@ -154,6 +160,8 @@ pub trait Reader {
154160
* Takes an optional SeekStyle, which affects how we seek from the
155161
* position. See `SeekStyle` docs for more details.
156162
*
163+
* `seek` is conceptually similar to C's `fseek` function.
164+
*
157165
* # Examples
158166
*
159167
* None right now.
@@ -163,6 +171,8 @@ pub trait Reader {
163171
/**
164172
* Returns the current position within the stream.
165173
*
174+
* `tell` is conceptually similar to C's `ftell` function.
175+
*
166176
* # Examples
167177
*
168178
* None right now.

0 commit comments

Comments
 (0)