Skip to content

Commit e58bc4c

Browse files
authored
Merge pull request #190 from ehuss/anonymous-lifetime-example
Hide extraneous `use` in anonymous lifetime example.
2 parents 395cb98 + da46c58 commit e58bc4c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/rust-2018/ownership-and-lifetimes/the-anonymous-lifetime.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ struct StrWrap<'a>(&'a str);
1616
In Rust 2015, you might have written:
1717

1818
```rust
19-
// Rust 2015
20-
21-
use std::fmt;
22-
19+
# use std::fmt;
2320
# struct StrWrap<'a>(&'a str);
21+
// Rust 2015
2422

2523
fn make_wrapper(string: &str) -> StrWrap {
2624
StrWrap(string)
@@ -38,7 +36,6 @@ In Rust 2018, you can instead write:
3836
```rust
3937
# use std::fmt;
4038
# struct StrWrap<'a>(&'a str);
41-
4239
// Rust 2018
4340

4441
fn make_wrapper(string: &str) -> StrWrap<'_> {

0 commit comments

Comments
 (0)