File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -312,7 +312,7 @@ fn parse_spec(spec: &str) -> (Vec<Directive>, Option<inner::Filter>) {
312
312
}
313
313
mods. map ( |m| {
314
314
for s in m. split ( ',' ) {
315
- if s. len ( ) == 0 {
315
+ if s. is_empty ( ) {
316
316
continue ;
317
317
}
318
318
let mut parts = s. split ( '=' ) ;
@@ -354,15 +354,15 @@ fn parse_spec(spec: &str) -> (Vec<Directive>, Option<inner::Filter>) {
354
354
}
355
355
} ) ;
356
356
357
- let filter = filter. map_or ( None , |filter| match inner:: Filter :: new ( filter) {
357
+ let filter = filter. and_then ( |filter| match inner:: Filter :: new ( filter) {
358
358
Ok ( re) => Some ( re) ,
359
359
Err ( e) => {
360
360
eprintln ! ( "warning: invalid regex filter - {}" , e) ;
361
361
None
362
362
}
363
363
} ) ;
364
364
365
- return ( dirs, filter) ;
365
+ ( dirs, filter)
366
366
}
367
367
368
368
// Check whether a level and target are enabled by the set of directives.
Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ from being printed.
9
9
10
10
#[ cfg( feature = "atty" ) ]
11
11
mod imp {
12
- use atty;
13
-
14
12
pub ( in crate :: fmt) fn is_stdout ( ) -> bool {
15
13
atty:: is ( atty:: Stream :: Stdout )
16
14
}
Original file line number Diff line number Diff line change 245
245
#![ cfg_attr( rustbuild, feature( staged_api, rustc_private) ) ]
246
246
#![ cfg_attr( rustbuild, unstable( feature = "rustc_private" , issue = "27812" ) ) ]
247
247
#![ deny( missing_debug_implementations, missing_docs, warnings) ]
248
+ #![ allow( clippy:: needless_doctest_main) ]
248
249
249
250
use std:: { borrow:: Cow , cell:: RefCell , env, io} ;
250
251
@@ -260,10 +261,10 @@ use self::fmt::writer::{self, Writer};
260
261
use self :: fmt:: Formatter ;
261
262
262
263
/// The default name for the environment variable to read filters from.
263
- pub const DEFAULT_FILTER_ENV : & ' static str = "RUST_LOG" ;
264
+ pub const DEFAULT_FILTER_ENV : & str = "RUST_LOG" ;
264
265
265
266
/// The default name for the environment variable to read style preferences from.
266
- pub const DEFAULT_WRITE_STYLE_ENV : & ' static str = "RUST_LOG_STYLE" ;
267
+ pub const DEFAULT_WRITE_STYLE_ENV : & str = "RUST_LOG_STYLE" ;
267
268
268
269
/// Set of environment variables to configure from.
269
270
///
You can’t perform that action at this time.
0 commit comments