cargo +nightly fix --edition-idioms
This commit is contained in:
parent
e28fae9974
commit
c0f93a6ea3
@ -8,11 +8,11 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
extern crate env_logger;
|
||||
use env_logger;
|
||||
#[macro_use]
|
||||
extern crate failure;
|
||||
extern crate getopts;
|
||||
extern crate rustfmt_nightly as rustfmt;
|
||||
|
||||
use rustfmt_nightly as rustfmt;
|
||||
|
||||
use std::env;
|
||||
use std::fs::File;
|
||||
@ -296,7 +296,7 @@ fn format(
|
||||
Ok(exit_code)
|
||||
}
|
||||
|
||||
fn format_and_emit_report<T: Write>(session: &mut Session<T>, input: Input) {
|
||||
fn format_and_emit_report<T: Write>(session: &mut Session<'_, T>, input: Input) {
|
||||
match session.format(input) {
|
||||
Ok(report) => {
|
||||
if report.has_warnings() {
|
||||
|
@ -13,9 +13,9 @@
|
||||
#![cfg(not(test))]
|
||||
#![deny(warnings)]
|
||||
|
||||
extern crate cargo_metadata;
|
||||
extern crate getopts;
|
||||
extern crate serde_json as json;
|
||||
use cargo_metadata;
|
||||
use getopts;
|
||||
|
||||
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::env;
|
||||
|
@ -14,16 +14,16 @@
|
||||
|
||||
#![deny(warnings)]
|
||||
|
||||
extern crate env_logger;
|
||||
use env_logger;
|
||||
#[macro_use]
|
||||
extern crate failure;
|
||||
extern crate getopts;
|
||||
use getopts;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate regex;
|
||||
use regex;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
extern crate serde_json as json;
|
||||
use serde_json as json;
|
||||
|
||||
use std::collections::HashSet;
|
||||
use std::io::{self, BufRead};
|
||||
|
@ -8,11 +8,11 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
extern crate env_logger;
|
||||
extern crate getopts;
|
||||
use env_logger;
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate rustfmt_nightly as rustfmt;
|
||||
use rustfmt_nightly as rustfmt;
|
||||
|
||||
use std::env;
|
||||
use std::io::stdout;
|
||||
|
16
src/lib.rs
16
src/lib.rs
@ -10,29 +10,13 @@
|
||||
|
||||
#[macro_use]
|
||||
extern crate derive_new;
|
||||
extern crate atty;
|
||||
extern crate bytecount;
|
||||
extern crate diff;
|
||||
extern crate dirs;
|
||||
extern crate failure;
|
||||
extern crate itertools;
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate regex;
|
||||
extern crate rustc_target;
|
||||
extern crate serde;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
extern crate serde_json;
|
||||
extern crate syntax;
|
||||
extern crate syntax_pos;
|
||||
extern crate toml;
|
||||
extern crate unicode_categories;
|
||||
extern crate unicode_segmentation;
|
||||
extern crate unicode_width;
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
|
Loading…
Reference in New Issue
Block a user