File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ chrono = "0.4.22"
4949crossbeam = { version = " 0.8.2" , optional = true }
5050dyn-clone = " 1.0.14"
5151flexible-string = { version = " 0.1.0" , optional = true }
52- if_chain = " 1.0.2"
5352is-terminal = " 0.4"
5453log = { version = " 0.4.21" , optional = true , features = [" kv" ] }
5554once_cell = " 1.16.0"
Original file line number Diff line number Diff line change @@ -5,8 +5,6 @@ use std::{
55 io:: { self , Write } ,
66} ;
77
8- use if_chain:: if_chain;
9-
108use crate :: {
119 formatter:: { Formatter , FormatterContext } ,
1210 sink:: { GetSinkProp , Sink , SinkProp } ,
@@ -176,10 +174,9 @@ impl Sink for StdStreamSink {
176174 let mut dest = self . dest . lock ( ) ;
177175
178176 ( || {
179- if_chain ! {
180- if self . should_render_style;
181- if let Some ( style_range) = ctx. style_range( ) ;
182- then {
177+ // TODO: Simplify the if block when our MSRV reaches let-chain support.
178+ if self . should_render_style {
179+ if let Some ( style_range) = ctx. style_range ( ) {
183180 let style = self . level_styles . style ( record. level ( ) ) ;
184181
185182 dest. write_all ( string_buf[ ..style_range. start ] . as_bytes ( ) ) ?;
@@ -190,7 +187,10 @@ impl Sink for StdStreamSink {
190187 } else {
191188 dest. write_all ( string_buf. as_bytes ( ) ) ?;
192189 }
190+ } else {
191+ dest. write_all ( string_buf. as_bytes ( ) ) ?;
193192 }
193+
194194 Ok ( ( ) )
195195 } ) ( )
196196 . map_err ( Error :: WriteRecord ) ?;
You can’t perform that action at this time.
0 commit comments