Skip to content

Commit

Permalink
Merge pull request #190 from ehuss/anonymous-lifetime-example
Browse files Browse the repository at this point in the history
Hide extraneous `use` in anonymous lifetime example.
  • Loading branch information
Centril authored Jul 31, 2019
2 parents 395cb98 + da46c58 commit e58bc4c
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ struct StrWrap<'a>(&'a str);
In Rust 2015, you might have written:

```rust
// Rust 2015

use std::fmt;

# use std::fmt;
# struct StrWrap<'a>(&'a str);
// Rust 2015

fn make_wrapper(string: &str) -> StrWrap {
StrWrap(string)
Expand All @@ -38,7 +36,6 @@ In Rust 2018, you can instead write:
```rust
# use std::fmt;
# struct StrWrap<'a>(&'a str);

// Rust 2018

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

0 comments on commit e58bc4c

Please sign in to comment.