forked from rust-lang/rust-by-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rust-lang#306 from GBGamer/link-ref-correct
Changed [link](example.com) to [link][example]
- Loading branch information
Showing
30 changed files
with
170 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
# Rust by Example | ||
|
||
[Rust](http://www.rust-lang.org/) is a programming language with a focus on | ||
[Rust][rust] is a programming language with a focus on | ||
type safety, memory safety, concurrency and performance. | ||
|
||
This book is a collection of bitesize examples that illustrate various rustic | ||
concepts and the Rust distribution libraries. | ||
|
||
Be sure to have rust [installed](http://www.rust-lang.org/install.html) and the | ||
[docs](http://doc.rust-lang.org/std/) at hand, let's | ||
Be sure to have rust [installed][install] and the | ||
[docs][std] at hand, let's | ||
start! | ||
|
||
*Note*: This book will follow the nightly version of Rust until we reach | ||
version 1.0, it's highly possible that some examples won't work with snapshot | ||
version like 0.10, be sure to use a nightly version! | ||
|
||
[rust]: http://www.rust-lang.org/ | ||
[install]: http://www.rust-lang.org/install.html | ||
[std]: http://doc.rust-lang.org/std/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
The `enum` keyword allows the creation of | ||
[tagged unions](http://en.wikipedia.org/wiki/Tagged_union), which can be used | ||
[tagged unions][tag-union], which can be used | ||
as algebraic data types | ||
([ADT](http://en.wikipedia.org/wiki/Algebraic_data_type)). | ||
([ADT][adt]). | ||
|
||
{enum.play} | ||
|
||
[adt]: http://en.wikipedia.org/wiki/Algebraic_data_type | ||
[tag-union]: http://en.wikipedia.org/wiki/Tagged_union |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
The compiler provides a `dead_code` | ||
[*lint*](https://en.wikipedia.org/wiki/Lint_%28software%29) that will warn | ||
[*lint*][lint] that will warn | ||
about unused functions. An *attribute* can be used to disable the lint. | ||
|
||
{unused.play} | ||
|
||
Note that in real programs, you should eliminate dead code. In these examples | ||
we'll allow dead code in some places because of the interactive nature of the | ||
examples. | ||
|
||
[lint]: https://en.wikipedia.org/wiki/Lint_%28software%29 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.