@@ -362,26 +362,30 @@ named!(mailbox_data_lsub<Response>, do_parse!(
362
362
363
363
// Unlike `status_att` in the RFC syntax, this includes the value,
364
364
// so that it can return a valid enum object instead of just a key.
365
- named ! ( status_att<StatusAttribute >, do_parse!(
366
- key: alt!(
367
- tag_s!( "HIGHESTMODSEQ" ) |
368
- tag_s!( "MESSAGES" ) |
369
- tag_s!( "RECENT" ) |
370
- tag_s!( "UIDNEXT" ) |
371
- tag_s!( "UIDVALIDITY" ) |
372
- tag_s!( "UNSEEN" )
373
- ) >>
374
- tag_s!( " " ) >>
375
- val: number >>
376
- ( match key {
377
- b"HIGHESTMODSEQ" => StatusAttribute :: HighestModSeq ( val) ,
378
- b"MESSAGES" => StatusAttribute :: Messages ( val) ,
379
- b"RECENT" => StatusAttribute :: Recent ( val) ,
380
- b"UIDNEXT" => StatusAttribute :: UidNext ( val) ,
381
- b"UIDVALIDITY" => StatusAttribute :: UidValidity ( val) ,
382
- b"UNSEEN" => StatusAttribute :: Unseen ( val) ,
383
- _ => panic!( "invalid status key {}" , str :: from_utf8( key) . unwrap( ) ) ,
384
- } )
365
+ named ! ( status_att<StatusAttribute >, alt!(
366
+ do_parse!(
367
+ tag_s!( "HIGHESTMODSEQ " ) >>
368
+ // note the _64 here
369
+ val: number_64 >>
370
+ ( StatusAttribute :: HighestModSeq ( val) ) ) |
371
+ do_parse!(
372
+ key: alt!(
373
+ tag_s!( "MESSAGES" ) |
374
+ tag_s!( "RECENT" ) |
375
+ tag_s!( "UIDNEXT" ) |
376
+ tag_s!( "UIDVALIDITY" ) |
377
+ tag_s!( "UNSEEN" )
378
+ ) >>
379
+ tag_s!( " " ) >>
380
+ val: number >>
381
+ ( match key {
382
+ b"MESSAGES" => StatusAttribute :: Messages ( val) ,
383
+ b"RECENT" => StatusAttribute :: Recent ( val) ,
384
+ b"UIDNEXT" => StatusAttribute :: UidNext ( val) ,
385
+ b"UIDVALIDITY" => StatusAttribute :: UidValidity ( val) ,
386
+ b"UNSEEN" => StatusAttribute :: Unseen ( val) ,
387
+ _ => panic!( "invalid status key {}" , str :: from_utf8( key) . unwrap( ) ) ,
388
+ } ) )
385
389
) ) ;
386
390
387
391
named ! ( status_att_list<Vec <StatusAttribute >>, do_parse!(
0 commit comments