Skip to content

Commit 8bb8bd5

Browse files
committed
---
yaml --- r: 51195 b: refs/heads/try c: a20d1ad h: refs/heads/master i: 51193: ba6595a 51191: 8ce0aa9 v: v3
1 parent 17da4f7 commit 8bb8bd5

File tree

6 files changed

+82
-22
lines changed

6 files changed

+82
-22
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 5f13e9ccc2e3328d4cd8ca49f84e6840dd998346
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: f7a2371c176663d59062ec5158f39faecba45768
5-
refs/heads/try: 951f460aa800cea36678a13b667140fa2acafdb9
5+
refs/heads/try: a20d1ad0cbcca13ee386fd819f33563b465f1185
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/LICENSE-MIT

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Copyright (c) 2006-2009 Graydon Hoare
2-
Copyright (c) 2009-2013 Mozilla Foundation
1+
Copyright (c) 2006-2012 Graydon Hoare
2+
Copyright (c) 2009-2012 Mozilla Foundation
33

44
Permission is hereby granted, free of charge, to any
55
person obtaining a copy of this software and associated

branches/try/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ packages:
4242
Assuming you're on a relatively modern *nix system and have met the
4343
prerequisites, something along these lines should work.
4444

45-
$ curl -O http://static.rust-lang.org/dist/rust-0.6.tar.gz
46-
$ tar -xzf rust-0.6.tar.gz
47-
$ cd rust-0.6
45+
$ curl -O http://static.rust-lang.org/dist/rust-0.5.tar.gz
46+
$ tar -xzf rust-0.5.tar.gz
47+
$ cd rust-0.5
4848
$ ./configure
4949
$ make && make install
5050

@@ -59,8 +59,8 @@ When complete, `make install` will place several programs into
5959
API-documentation tool, and `rustpkg`, the Rust package manager and build system.
6060

6161
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
62-
[tarball]: http://static.rust-lang.org/dist/rust-0.6.tar.gz
63-
[win-exe]: http://static.rust-lang.org/dist/rust-0.6-install.exe
62+
[tarball]: http://static.rust-lang.org/dist/rust-0.5.tar.gz
63+
[win-exe]: http://static.rust-lang.org/dist/rust-0.5-install.exe
6464

6565

6666
## License

branches/try/doc/tutorial.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ If you've fulfilled those prerequisites, something along these lines
9999
should work.
100100

101101
~~~~ {.notrust}
102-
$ curl -O http://static.rust-lang.org/dist/rust-0.6.tar.gz
103-
$ tar -xzf rust-0.6.tar.gz
104-
$ cd rust-0.6
102+
$ curl -O http://static.rust-lang.org/dist/rust-0.5.tar.gz
103+
$ tar -xzf rust-0.5.tar.gz
104+
$ cd rust-0.5
105105
$ ./configure
106106
$ make && make install
107107
~~~~
@@ -119,8 +119,8 @@ API-documentation tool; `rustpkg`, the Rust package manager;
119119
interface for them, and for a few common command line scenarios.
120120

121121
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
122-
[tarball]: http://static.rust-lang.org/dist/rust-0.6.tar.gz
123-
[win-exe]: http://static.rust-lang.org/dist/rust-0.6-install.exe
122+
[tarball]: http://static.rust-lang.org/dist/rust-0.5.tar.gz
123+
[win-exe]: http://static.rust-lang.org/dist/rust-0.5-install.exe
124124

125125
## Compiling your first program
126126

branches/try/src/etc/pkg/rust.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
SetupIconFile=rust-logo.ico
66
AppName=Rust
77
AppVersion={#CFG_VERSION}
8-
AppCopyright=Copyright (C) 2006-2013 Mozilla Foundation, MIT license
8+
AppCopyright=Copyright (C) 2006-2012 Mozilla Foundation, MIT license
99
AppPublisher=Mozilla Foundation
1010
AppPublisherURL=http://www.rust-lang.org
1111
VersionInfoVersion={#CFG_VERSION}

branches/try/src/libcore/io.rs

Lines changed: 68 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,29 +49,89 @@ pub mod rustrt {
4949

5050
// FIXME (#2004): This is all buffered. We might need an unbuffered variant
5151
// as well
52+
/**
53+
* The SeekStyle enum describes the relationship between the position
54+
* we'd like to seek to from our current position. It's used as an argument
55+
* to the `seek` method defined on the `Reader` trait.
56+
*
57+
* There are three seek styles:
58+
*
59+
* 1. `SeekSet` means that the new position should become our position.
60+
* 2. `SeekCur` means that we should seek from the current position.
61+
* 3. `SeekEnd` means that we should seek from the end.
62+
*
63+
* # Examples
64+
*
65+
* None right now.
66+
*/
5267
pub enum SeekStyle { SeekSet, SeekEnd, SeekCur, }
5368

5469

55-
/// The raw underlying reader trait. All readers must implement this.
70+
/**
71+
* The core Reader trait. All readers must implement this trait.
72+
*
73+
* # Examples
74+
*
75+
* None right now.
76+
*/
5677
pub trait Reader {
5778
// FIXME (#2004): Seekable really should be orthogonal.
5879

59-
/// Read up to len bytes (or EOF) and put them into bytes (which
60-
/// must be at least len bytes long). Return number of bytes read.
6180
// FIXME (#2982): This should probably return an error.
81+
/**
82+
* Reads bytes and puts them into `bytes`. Returns the number of
83+
* bytes read.
84+
*
85+
* The number of bytes to be read is `len` or the end of the file,
86+
* whichever comes first.
87+
*
88+
* The buffer must be at least `len` bytes long.
89+
*
90+
* # Examples
91+
*
92+
* None right now.
93+
*/
6294
fn read(&self, bytes: &mut [u8], len: uint) -> uint;
6395

64-
/// Read a single byte, returning a negative value for EOF or read error.
96+
/**
97+
* Reads a single byte.
98+
*
99+
* In the case of an EOF or an error, returns a negative value.
100+
*
101+
* # Examples
102+
*
103+
* None right now.
104+
*/
65105
fn read_byte(&self) -> int;
66106

67-
/// Return whether the stream is currently at EOF position.
107+
/**
108+
* Returns a boolean value: are we currently at EOF?
109+
*
110+
* # Examples
111+
*
112+
* None right now.
113+
*/
68114
fn eof(&self) -> bool;
69115

70-
/// Move the current position within the stream. The second parameter
71-
/// determines the position that the first parameter is relative to.
116+
/**
117+
* Seek to a given `position` in the stream.
118+
*
119+
* Takes an optional SeekStyle, which affects how we seek from the
120+
* position. See `SeekStyle` docs for more details.
121+
*
122+
* # Examples
123+
*
124+
* None right now.
125+
*/
72126
fn seek(&self, position: int, style: SeekStyle);
73127

74-
/// Return the current position within the stream.
128+
/**
129+
* Returns the current position within the stream.
130+
*
131+
* # Examples
132+
*
133+
* None right now.
134+
*/
75135
fn tell(&self) -> uint;
76136
}
77137

0 commit comments

Comments
 (0)