aboutsummaryrefslogtreecommitdiff
path: root/src/imap/flow.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-07-13 15:26:00 +0200
committerAlex Auvolat <alex@adnab.me>2022-07-13 15:26:00 +0200
commitc703e3e2b813cf74fc2d3d87b045dcc9fb93d190 (patch)
treee7aa3a1ca2922207bad4275c4a2afb111bf2f13a /src/imap/flow.rs
parent15a354f9499c82dff69db71d92097bec51ee54bf (diff)
downloadaerogramme-c703e3e2b813cf74fc2d3d87b045dcc9fb93d190.tar.gz
aerogramme-c703e3e2b813cf74fc2d3d87b045dcc9fb93d190.zip
Fix list wildcards
Diffstat (limited to 'src/imap/flow.rs')
-rw-r--r--src/imap/flow.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/imap/flow.rs b/src/imap/flow.rs
index 303b498..0adf1f0 100644
--- a/src/imap/flow.rs
+++ b/src/imap/flow.rs
@@ -41,8 +41,14 @@ impl State {
match (self, tr) {
(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::Authenticated(u), Transition::Examine(m)) => Ok(State::Examined(u, m)),
+ (
+ State::Authenticated(u) | State::Selected(u, _) | State::Examined(u, _),
+ Transition::Select(m),
+ ) => Ok(State::Selected(u, m)),
+ (
+ State::Authenticated(u) | State::Selected(u, _) | State::Examined(u, _),
+ Transition::Examine(m),
+ ) => Ok(State::Examined(u, m)),
(State::Selected(u, _), Transition::Unselect) => Ok(State::Authenticated(u)),
(State::Examined(u, _), Transition::Unselect) => Ok(State::Authenticated(u)),
(_, Transition::Logout) => Ok(State::Logout),