mirror of
https://github.com/rust-lang-nursery/rust-cookbook
synced 2024-11-21 19:13:07 +00:00
Use edition 2018 everywhere
This commit is contained in:
parent
752b035c1a
commit
f21d36a3dd
4 changed files with 3 additions and 14 deletions
|
@ -271,9 +271,7 @@ Mark examples that depend on external systems with `no_run` or remove them
|
|||
if they are not required for the example. Avoid inline comments, preferring
|
||||
explanation in the description.
|
||||
|
||||
> ```rust
|
||||
> extern crate rand;
|
||||
>
|
||||
> ```rust,edition2018
|
||||
> use rand::distributions::{Normal, Distribution};
|
||||
>
|
||||
> fn main() {
|
||||
|
|
3
build.rs
3
build.rs
|
@ -1,6 +1,3 @@
|
|||
extern crate skeptic;
|
||||
extern crate walkdir;
|
||||
|
||||
use walkdir::WalkDir;
|
||||
|
||||
const REMOVED_TESTS: &[&str] = &[
|
||||
|
|
|
@ -24,10 +24,7 @@ to prevent the entire program from blocking on the worker for-loops. You can
|
|||
think of the calls to `drop` as signaling that no more messages will be sent.
|
||||
|
||||
|
||||
```rust
|
||||
extern crate crossbeam;
|
||||
extern crate crossbeam_channel;
|
||||
|
||||
```rust,edition2018
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
use crossbeam_channel::bounded;
|
||||
|
|
|
@ -6,10 +6,7 @@ by [`serde_json::to_string`] and [`serde_json::from_str`] performs deserializati
|
|||
|
||||
Note that serialization followed by deserialization gives back the original matrix.
|
||||
|
||||
```rust
|
||||
extern crate nalgebra;
|
||||
extern crate serde_json;
|
||||
|
||||
```rust,edition2018
|
||||
use nalgebra::DMatrix;
|
||||
|
||||
fn main() -> Result<(), std::io::Error> {
|
||||
|
|
Loading…
Reference in a new issue