From 7153b30a4366bed59feceda2352d7c3b43138fdf Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Sat, 6 Mar 2021 20:17:35 -0600 Subject: [PATCH] fix tests --- imap/src/parser/mod.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/imap/src/parser/mod.rs b/imap/src/parser/mod.rs index 86646ec..6128022 100644 --- a/imap/src/parser/mod.rs +++ b/imap/src/parser/mod.rs @@ -447,21 +447,21 @@ mod tests { assert_eq!( parse_response("* OK IMAP4rev1 Service Ready\r\n"), - Ok(Response::Data { + Ok(Response::Data(ResponseData { status: Status::Ok, code: None, information: Some("IMAP4rev1 Service Ready".to_owned()), - }) + })) ); assert_eq!( parse_response("a001 OK LOGIN completed\r\n"), - Ok(Response::Done { + Ok(Response::Done(ResponseDone { tag: "a001".to_owned(), status: Status::Ok, code: None, information: Some("LOGIN completed".to_owned()), - }) + })) ); assert_eq!( @@ -487,30 +487,30 @@ mod tests { assert_eq!( parse_response("* OK [UNSEEN 17] Message 17 is the first unseen message\r\n"), - Ok(Response::Data { + Ok(Response::Data(ResponseData { status: Status::Ok, code: Some(ResponseCode::Unseen(17)), information: Some("Message 17 is the first unseen message".to_owned()), - }) + })) ); assert_eq!( parse_response("* OK [UIDVALIDITY 3857529045] UIDs valid\r\n"), - Ok(Response::Data { + Ok(Response::Data(ResponseData { status: Status::Ok, code: Some(ResponseCode::UidValidity(3857529045)), information: Some("UIDs valid".to_owned()), - }) + })) ); assert_eq!( parse_response("a002 OK [READ-WRITE] SELECT completed\r\n"), - Ok(Response::Done { + Ok(Response::Done(ResponseDone { tag: "a002".to_owned(), status: Status::Ok, code: Some(ResponseCode::ReadWrite), information: Some("SELECT completed".to_owned()), - }) + })) ); assert_eq!(