-
-
Notifications
You must be signed in to change notification settings - Fork 15
feat: Implement RFC 2342 (NAMESPACE) in imap-codec #669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…map-types fuzz configurations
imap-types/src/response.rs
Outdated
|
||
#[cfg(feature = "ext_namespace")] | ||
Namespace { | ||
personal: Option<Vec<NamespaceDescription<'a>>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question:
Since the ABNF seems to be ...
Namespace = nil / "(" 1*Namespace-Descr ")"
... would it make sense to just use a Vec<NamespaceDescription>
without the Option
and make it so that an empty vector is encoded as nil
?
Currently, None
would mean nil
but someone could still instantiate Some(vec![])
which... well... should also mean nil
? Unclear.
For cases where we want to encode a vector with at least one element, we have Vec1
. But instead using Option<Vec1>
, Vec
is even simpler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Damian Poddebniak <poddebniak@mailbox.org>
With some minor corrections, this looks already good! See b5a3691.
|
Could you run |
No description provided.