aboutsummaryrefslogtreecommitdiff
path: root/src/imap/flow.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-06-29 12:50:44 +0200
committerAlex Auvolat <alex@adnab.me>2022-06-29 12:50:44 +0200
commit90b143e1c57c6561998176878b2cc586b2d89c80 (patch)
treea9f07995d9d29e9f884756cad5732bfb2cbeb3fc /src/imap/flow.rs
parent9979671b001ccb25917da7091d13ad3fc1096330 (diff)
downloadaerogramme-90b143e1c57c6561998176878b2cc586b2d89c80.tar.gz
aerogramme-90b143e1c57c6561998176878b2cc586b2d89c80.zip
Refactor to allow mutability
Diffstat (limited to 'src/imap/flow.rs')
-rw-r--r--src/imap/flow.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/imap/flow.rs b/src/imap/flow.rs
index bd4c484..7370bd1 100644
--- a/src/imap/flow.rs
+++ b/src/imap/flow.rs
@@ -28,7 +28,7 @@ pub enum State {
}
pub enum Transition {
- No,
+ None,
Authenticate(User),
Select(Mailbox),
Unselect,
@@ -40,7 +40,7 @@ pub enum Transition {
impl State {
pub fn apply(self, tr: Transition) -> Result<Self, Error> {
match (self, tr) {
- (s, Transition::No) => Ok(s),
+ (s, Transition::None) => Ok(s),
(State::NotAuthenticated, Transition::Authenticate(u)) => Ok(State::Authenticated(u)),
(State::Authenticated(u), Transition::Select(m)) => Ok(State::Selected(u, m)),
(State::Selected(u, _), Transition::Unselect) => Ok(State::Authenticated(u)),