File tree Expand file tree Collapse file tree 3 files changed +8
-11
lines changed
Expand file tree Collapse file tree 3 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ bincode = "1.3.3"
2626chrono = " 0.4"
2727
2828[features ]
29- default = [" full_encoding " ]
29+ default = []
3030full_encoding = [" encoding_rs" ]
3131serde = [" dep:serde" ]
3232rkyv = [" dep:rkyv" ]
Original file line number Diff line number Diff line change @@ -60,8 +60,9 @@ mod tests {
6060 ] ;
6161
6262 for input in inputs {
63- let decoder = charset_decoder ( input. 0 . as_bytes ( ) )
64- . expect ( & ( "Failed to find decoder for " . to_owned ( ) + input. 0 ) ) ;
63+ let decoder = charset_decoder ( input. 0 . as_bytes ( ) ) . unwrap_or_else ( || {
64+ panic ! ( "{}" , ( "Failed to find decoder for " . to_owned( ) + input. 0 ) )
65+ } ) ;
6566
6667 assert_eq ! ( decoder( & input. 1 ) , input. 2 ) ;
6768 }
Original file line number Diff line number Diff line change @@ -138,15 +138,11 @@ impl<'x> AddressParser<'x> {
138138 }
139139
140140 if !self . mail_tokens . is_empty ( ) {
141- if self . group_name . is_none ( ) {
142- self . group_name = concat_tokens ( & mut self . mail_tokens ) . into ( ) ;
141+ if let Some ( group_name) = & self . group_name {
142+ self . group_name =
143+ Some ( format ! ( "{} {}" , group_name, concat_tokens( & mut self . mail_tokens) ) . into ( ) ) ;
143144 } else {
144- self . group_name = Some (
145- ( self . group_name . as_ref ( ) . unwrap ( ) . as_ref ( ) . to_owned ( )
146- + " "
147- + concat_tokens ( & mut self . mail_tokens ) . as_ref ( ) )
148- . into ( ) ,
149- ) ;
145+ self . group_name = concat_tokens ( & mut self . mail_tokens ) . into ( ) ;
150146 }
151147 }
152148 }
You can’t perform that action at this time.
0 commit comments