cargo +nightly fix --edition-idioms

This commit is contained in:
Hirokazu Hata 2019-02-09 15:53:12 +09:00
parent e28fae9974
commit c0f93a6ea3
5 changed files with 14 additions and 30 deletions

View File

@ -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() {

View File

@ -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;

View File

@ -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};

View File

@ -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;

View File

@ -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;