File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ Specify logging filters in code instead of using an environment variable.
6
6
extern crate log;
7
7
extern crate env_logger;
8
8
9
- use env_logger:: Env ;
10
-
11
9
fn main ( ) {
12
10
env_logger:: builder ( )
13
11
. filter_level ( log:: LevelFilter :: Trace )
Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ pub(crate) struct Builder {
117
117
pub default_format_timestamp_nanos : bool ,
118
118
pub default_format_module_path : bool ,
119
119
pub default_format_level : bool ,
120
+ #[ allow( unknown_lints, bare_trait_objects) ]
120
121
pub custom_format : Option < Box < Fn ( & mut Formatter , & Record ) -> io:: Result < ( ) > + Sync + Send > > ,
121
122
built : bool ,
122
123
}
@@ -140,6 +141,7 @@ impl Builder {
140
141
/// If the `custom_format` is `Some`, then any `default_format` switches are ignored.
141
142
/// If the `custom_format` is `None`, then a default format is returned.
142
143
/// Any `default_format` switches set to `false` won't be written by the format.
144
+ #[ allow( unknown_lints, bare_trait_objects) ]
143
145
pub fn build ( & mut self ) -> Box < Fn ( & mut Formatter , & Record ) -> io:: Result < ( ) > + Sync + Send > {
144
146
assert ! ( !self . built, "attempt to re-use consumed builder" ) ;
145
147
@@ -353,4 +355,4 @@ mod tests {
353
355
354
356
assert_eq ! ( "log message\n " , written) ;
355
357
}
356
- }
358
+ }
Original file line number Diff line number Diff line change @@ -322,6 +322,7 @@ struct Var<'a> {
322
322
pub struct Logger {
323
323
writer : Writer ,
324
324
filter : Filter ,
325
+ #[ allow( unknown_lints, bare_trait_objects) ]
325
326
format : Box < Fn ( & mut Formatter , & Record ) -> io:: Result < ( ) > + Sync + Send > ,
326
327
}
327
328
You can’t perform that action at this time.
0 commit comments