Skip to content

Commit d6fcfb9

Browse files
committed
---
yaml --- r: 60524 b: refs/heads/auto c: d019e14 h: refs/heads/master v: v3
1 parent 3ca6502 commit d6fcfb9

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
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 3a481c0f88025318eba7c48907a5c1d966e01d27
17+
refs/heads/auto: d019e145c033ac60d4413321da21d3e877b4b786
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/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)