Skip to content

Commit 1937bf2

Browse files
committed
Migrate tidy to rust 2018 edition
1 parent 3af1bdc commit 1937bf2

File tree

5 files changed

+3
-10
lines changed

5 files changed

+3
-10
lines changed

src/tools/tidy/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "tidy"
33
version = "0.1.0"
44
authors = ["Alex Crichton <[email protected]>"]
5+
edition = "2018"
56

67
[dependencies]
78
regex = "1"

src/tools/tidy/src/deps.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use std::fs;
55
use std::path::Path;
66
use std::process::Command;
77

8+
use serde_derive::Deserialize;
89
use serde_json;
910

1011
const LICENSES: &[&str] = &[

src/tools/tidy/src/features.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use std::path::Path;
1818
use regex::{Regex, escape};
1919

2020
mod version;
21-
use self::version::Version;
21+
use version::Version;
2222

2323
const FEATURE_GROUP_START_PREFIX: &str = "// feature-group-start";
2424
const FEATURE_GROUP_END_PREFIX: &str = "// feature-group-end";

src/tools/tidy/src/lib.rs

-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@
33
//! This library contains the tidy lints and exposes it
44
//! to be used by tools.
55
6-
#![deny(rust_2018_idioms)]
7-
8-
extern crate regex;
9-
extern crate serde_json;
10-
#[macro_use]
11-
extern crate serde_derive;
12-
136
use std::fs;
147

158
use std::path::Path;

src/tools/tidy/src/main.rs

-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
//! etc. This is run by default on `make check` and as part of the auto
55
//! builders.
66
7-
#![deny(rust_2018_idioms)]
87
#![deny(warnings)]
98

10-
extern crate tidy;
119
use tidy::*;
1210

1311
use std::process;

0 commit comments

Comments
 (0)