File tree Expand file tree Collapse file tree 4 files changed +5
-9
lines changed Expand file tree Collapse file tree 4 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 11use anyhow:: { format_err, Result } ;
2- use env_logger ;
2+
33use io:: Error as IoError ;
44use thiserror:: Error ;
55
@@ -233,7 +233,7 @@ fn execute(opts: &Options) -> Result<i32> {
233233 let file = PathBuf :: from ( path) ;
234234 let file = file. canonicalize ( ) . unwrap_or ( file) ;
235235
236- let ( config, _) = load_config ( Some ( file. parent ( ) . unwrap ( ) ) , Some ( options. clone ( ) ) ) ?;
236+ let ( config, _) = load_config ( Some ( file. parent ( ) . unwrap ( ) ) , Some ( options) ) ?;
237237 let toml = config. all_options ( ) . to_toml ( ) ?;
238238 io:: stdout ( ) . write_all ( toml. as_bytes ( ) ) ?;
239239
@@ -565,7 +565,7 @@ impl GetOptsOptions {
565565 options. inline_config = matches
566566 . opt_strs ( "config" )
567567 . iter ( )
568- . flat_map ( |config| config. split ( "," ) )
568+ . flat_map ( |config| config. split ( ',' ) )
569569 . map (
570570 |key_val| match key_val. char_indices ( ) . find ( |( _, ch) | * ch == '=' ) {
571571 Some ( ( middle, _) ) => {
@@ -681,7 +681,7 @@ impl CliOptions for GetOptsOptions {
681681 }
682682
683683 fn config_path ( & self ) -> Option < & Path > {
684- self . config_path . as_ref ( ) . map ( |p| & * * p )
684+ self . config_path . as_deref ( )
685685 }
686686}
687687
Original file line number Diff line number Diff line change 22
33#![ deny( warnings) ]
44
5- use cargo_metadata;
6-
75use std:: cmp:: Ordering ;
86use std:: collections:: { BTreeMap , BTreeSet } ;
97use std:: env;
Original file line number Diff line number Diff line change 44
55#![ deny( warnings) ]
66
7- use env_logger;
87#[ macro_use]
98extern crate log;
10- use regex ;
9+
1110use serde:: { Deserialize , Serialize } ;
1211use serde_json as json;
1312use thiserror:: Error ;
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ use std::path::{Path, PathBuf};
77use std:: process:: Command ;
88use std:: str:: FromStr ;
99
10- use env_logger;
1110use getopts:: { Matches , Options } ;
1211use rustfmt_nightly as rustfmt;
1312
You can’t perform that action at this time.
0 commit comments