mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 07:16:31 +03:00
Make it possible to compile with stable Rust
This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
#![forbid(unsafe_code)]
|
#![forbid(unsafe_code)]
|
||||||
#![deny(clippy::correctness, missing_debug_implementations, clippy::all)]
|
#![deny(clippy::correctness, missing_debug_implementations, clippy::all)]
|
||||||
#![allow(clippy::match_bool)]
|
#![allow(clippy::match_bool)]
|
||||||
#![feature(ptr_wrapping_offset_from)]
|
|
||||||
#![feature(drain_filter)]
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate failure_derive;
|
extern crate failure_derive;
|
||||||
|
|||||||
@@ -178,10 +178,16 @@ impl<'a> MimeMessage<'a> {
|
|||||||
#[allow(clippy::cognitive_complexity)]
|
#[allow(clippy::cognitive_complexity)]
|
||||||
fn parse_headers(&mut self) -> Result<()> {
|
fn parse_headers(&mut self) -> Result<()> {
|
||||||
if self.get(HeaderDef::AutocryptSetupMessage).is_some() {
|
if self.get(HeaderDef::AutocryptSetupMessage).is_some() {
|
||||||
self.parts.drain_filter(|part| {
|
self.parts = self
|
||||||
part.mimetype.is_some()
|
.parts
|
||||||
&& part.mimetype.as_ref().unwrap().as_ref() != MIME_AC_SETUP_FILE
|
.iter()
|
||||||
});
|
.filter(|part| {
|
||||||
|
part.mimetype.is_none()
|
||||||
|
|| part.mimetype.as_ref().unwrap().as_ref() == MIME_AC_SETUP_FILE
|
||||||
|
})
|
||||||
|
.cloned()
|
||||||
|
.collect();
|
||||||
|
|
||||||
if self.parts.len() == 1 {
|
if self.parts.len() == 1 {
|
||||||
self.is_system_message = SystemMessage::AutocryptSetupMessage;
|
self.is_system_message = SystemMessage::AutocryptSetupMessage;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user