File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -431,12 +431,9 @@ impl<'a> StrftimeItems<'a> {
431
431
use Item :: { Literal , Space } ;
432
432
use Numeric :: * ;
433
433
434
- match remainder. chars ( ) . next ( ) {
435
- // we are done
436
- None => None ,
437
-
434
+ match remainder. chars ( ) . next ( ) ? {
438
435
// the next item is a specifier
439
- Some ( '%' ) => {
436
+ '%' => {
440
437
let original = remainder;
441
438
remainder = & remainder[ 1 ..] ;
442
439
let mut error_len = 0 ;
@@ -664,7 +661,7 @@ impl<'a> StrftimeItems<'a> {
664
661
}
665
662
666
663
// the next item is space
667
- Some ( c ) if c. is_whitespace ( ) => {
664
+ c if c. is_whitespace ( ) => {
668
665
// `%` is not a whitespace, so `c != '%'` is redundant
669
666
let nextspec =
670
667
remainder. find ( |c : char | !c. is_whitespace ( ) ) . unwrap_or ( remainder. len ( ) ) ;
You can’t perform that action at this time.
0 commit comments