fix: pass session as &mut

This commit is contained in:
Michael Bøcker-Larsen 2020-12-17 11:37:01 +08:00
parent cdf320fb0c
commit e6341ccfc0
No known key found for this signature in database
GPG key ID: FEC5F9A03674F95A

View file

@ -86,7 +86,7 @@ pub struct Connection<T: Read + Write> {
/// A builder for the append command /// A builder for the append command
pub struct AppendCmd<'a, T: Read + Write> { pub struct AppendCmd<'a, T: Read + Write> {
session: &'a Session<T>, session: &'a mut Session<T>,
content: &'a [u8], content: &'a [u8],
mailbox: &'a str, mailbox: &'a str,
flags: Vec<&'a Flag<'a>>, flags: Vec<&'a Flag<'a>>,
@ -1163,7 +1163,7 @@ impl<T: Read + Write> Session<T> {
content: B, content: B,
) -> AppendCmd<'a, T> { ) -> AppendCmd<'a, T> {
AppendCmd { AppendCmd {
session: &self, session: self,
content: content.as_ref(), content: content.as_ref(),
mailbox: mailbox.as_ref(), mailbox: mailbox.as_ref(),
flags: Vec::new(), flags: Vec::new(),