Skip to content

Commit d4370db

Browse files
committed
fourth
1 parent 9186a31 commit d4370db

File tree

5 files changed

+7
-14
lines changed

5 files changed

+7
-14
lines changed

src/about.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Consider this example for "generate random numbers within a range":
5757
[![rand-badge]][rand] [![cat-science-badge]][cat-science]
5858

5959
```rust,edition2018
60+
extern crate rand;
6061
use rand::Rng;
6162
6263
fn main() {

src/algorithms/randomness/rand-range.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This has the same effect, but may be faster when repeatedly generating numbers
2020
in the same range.
2121

2222
```rust,edition2018
23-
23+
extern crate rand;
2424
use rand::distributions::{Distribution, Uniform};
2525
2626
fn main() {

src/compression/tar/tar-decompress.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ named `archive.tar.gz` located in the current working directory
88
to the same location.
99

1010
```rust,edition2018,no_run
11-
11+
extern crate flate2;
12+
extern crate tar;
1213
use std::fs::File;
1314
use flate2::read::GzDecoder;
1415
use tar::Archive;

src/encoding/complex/toml.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ fn main() -> Result<(), Error> {
3333
Parse TOML into your own structs using [Serde].
3434

3535
```rust,edition2018
36+
extern crate toml;
3637
use serde::Deserialize;
3738
3839
use toml::de::Error;

src/file/read-write/same-file.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ to be written to are tested for equality.
88

99
```rust,edition2018
1010
extern crate same_file;
11-
use same_file::is_same_file;
11+
use same_file::{is_same_file, Handle};
1212
use std::fs::File;
1313
use std::io::{BufRead, BufReader, Error, ErrorKind};
1414
use std::path::Path;
@@ -36,14 +36,4 @@ fn main() -> Result<(), Error> {
3636
}
3737
```
3838

39-
```bash
40-
cargo run
41-
```
42-
displays the contents of the file new.txt.
43-
44-
```bash
45-
cargo run >> ./new.txt
46-
```
47-
errors because the two files are same.
48-
49-
[`same_file::Handle`]: https://docs.rs/same-file/*/same_file/struct.Handle.html
39+
```

0 commit comments

Comments
 (0)