diff --git a/examples/custom_parser.rs b/examples/custom_parser.rs index d6642fc..ffb3c00 100644 --- a/examples/custom_parser.rs +++ b/examples/custom_parser.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use mail_parser::{HeaderName, MessageParser}; diff --git a/examples/mailbox_iterate_maildir.rs b/examples/mailbox_iterate_maildir.rs index 0d32edb..5ca5593 100644 --- a/examples/mailbox_iterate_maildir.rs +++ b/examples/mailbox_iterate_maildir.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::path::PathBuf; diff --git a/examples/mailbox_parse_mbox.rs b/examples/mailbox_parse_mbox.rs index ef5a6c4..55e210f 100644 --- a/examples/mailbox_parse_mbox.rs +++ b/examples/mailbox_parse_mbox.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use mail_parser::{mailbox::mbox::MessageIterator, MessageParser}; diff --git a/examples/message_parse.rs b/examples/message_parse.rs index 488103a..1b450f6 100644 --- a/examples/message_parse.rs +++ b/examples/message_parse.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use mail_parser::*; diff --git a/examples/message_write_attachments.rs b/examples/message_write_attachments.rs index 41e51df..eb143f6 100644 --- a/examples/message_write_attachments.rs +++ b/examples/message_write_attachments.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use mail_parser::*; diff --git a/src/core/address.rs b/src/core/address.rs index c408c09..fad702c 100644 --- a/src/core/address.rs +++ b/src/core/address.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use crate::{Addr, Address, Group}; diff --git a/src/core/body.rs b/src/core/body.rs index ac22645..c94e20a 100644 --- a/src/core/body.rs +++ b/src/core/body.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use crate::{AttachmentIterator, BodyPartIterator, Message, MessagePart, MessagePartId, PartType}; diff --git a/src/core/builder.rs b/src/core/builder.rs index 8a20de1..9e1ca84 100644 --- a/src/core/builder.rs +++ b/src/core/builder.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use crate::{HeaderName, HeaderValue, MessageParser}; diff --git a/src/core/header.rs b/src/core/header.rs index a383893..bf2537d 100644 --- a/src/core/header.rs +++ b/src/core/header.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use core::fmt; diff --git a/src/core/message.rs b/src/core/message.rs index 9ab4aa5..7d8e94e 100644 --- a/src/core/message.rs +++ b/src/core/message.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::{borrow::Cow, convert::TryInto}; diff --git a/src/core/mod.rs b/src/core/mod.rs index 7787967..b4d915f 100644 --- a/src/core/mod.rs +++ b/src/core/mod.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ pub mod address; diff --git a/src/decoders/base64.rs b/src/decoders/base64.rs index ebd9957..82d2dee 100644 --- a/src/decoders/base64.rs +++ b/src/decoders/base64.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::borrow::Cow; diff --git a/src/decoders/charsets/map.rs b/src/decoders/charsets/map.rs index 2be87cd..2336705 100644 --- a/src/decoders/charsets/map.rs +++ b/src/decoders/charsets/map.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use super::{ diff --git a/src/decoders/charsets/mod.rs b/src/decoders/charsets/mod.rs index 6bf5a3a..cd8a61f 100644 --- a/src/decoders/charsets/mod.rs +++ b/src/decoders/charsets/mod.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ pub mod map; diff --git a/src/decoders/charsets/multi_byte.rs b/src/decoders/charsets/multi_byte.rs index 69d8a11..7989586 100644 --- a/src/decoders/charsets/multi_byte.rs +++ b/src/decoders/charsets/multi_byte.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ #[cfg(feature = "full_encoding")] diff --git a/src/decoders/charsets/single_byte.rs b/src/decoders/charsets/single_byte.rs index 8783ae1..a582ccc 100644 --- a/src/decoders/charsets/single_byte.rs +++ b/src/decoders/charsets/single_byte.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ fn single_byte_decoder(table: &[char], bytes: &[u8]) -> String { diff --git a/src/decoders/charsets/utf.rs b/src/decoders/charsets/utf.rs index be3208f..e7a7d4a 100644 --- a/src/decoders/charsets/utf.rs +++ b/src/decoders/charsets/utf.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::char::{decode_utf16, REPLACEMENT_CHARACTER}; diff --git a/src/decoders/encoded_word.rs b/src/decoders/encoded_word.rs index 5c4a1d9..61138dc 100644 --- a/src/decoders/encoded_word.rs +++ b/src/decoders/encoded_word.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use crate::{decoders::charsets::map::charset_decoder, parsers::MessageStream}; diff --git a/src/decoders/hex.rs b/src/decoders/hex.rs index c88d7b9..50e06a8 100644 --- a/src/decoders/hex.rs +++ b/src/decoders/hex.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use super::quoted_printable::HEX_MAP; diff --git a/src/decoders/html.rs b/src/decoders/html.rs index c37ccba..e76960d 100644 --- a/src/decoders/html.rs +++ b/src/decoders/html.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::char::REPLACEMENT_CHARACTER; diff --git a/src/decoders/mod.rs b/src/decoders/mod.rs index 82ec8c4..e5f8a28 100644 --- a/src/decoders/mod.rs +++ b/src/decoders/mod.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::borrow::Cow; diff --git a/src/decoders/quoted_printable.rs b/src/decoders/quoted_printable.rs index 6930ae2..b362d70 100644 --- a/src/decoders/quoted_printable.rs +++ b/src/decoders/quoted_printable.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::borrow::Cow; diff --git a/src/lib.rs b/src/lib.rs index 1047422..839cdc1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ #![doc = include_str!("../README.md")] #![deny(rust_2018_idioms)] diff --git a/src/mailbox/maildir.rs b/src/mailbox/maildir.rs index 3f2cf05..617e981 100644 --- a/src/mailbox/maildir.rs +++ b/src/mailbox/maildir.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::{ diff --git a/src/mailbox/mbox.rs b/src/mailbox/mbox.rs index 4847ca9..7d6ce0f 100644 --- a/src/mailbox/mbox.rs +++ b/src/mailbox/mbox.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use crate::DateTime; diff --git a/src/parsers/fields/address.rs b/src/parsers/fields/address.rs index 0bd1ac9..b82fe21 100644 --- a/src/parsers/fields/address.rs +++ b/src/parsers/fields/address.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::borrow::Cow; diff --git a/src/parsers/fields/content_type.rs b/src/parsers/fields/content_type.rs index ac03f90..b565d22 100644 --- a/src/parsers/fields/content_type.rs +++ b/src/parsers/fields/content_type.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::borrow::Cow; diff --git a/src/parsers/fields/date.rs b/src/parsers/fields/date.rs index ec2ad13..2e7db11 100644 --- a/src/parsers/fields/date.rs +++ b/src/parsers/fields/date.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::fmt; diff --git a/src/parsers/fields/id.rs b/src/parsers/fields/id.rs index 3921a43..673212e 100644 --- a/src/parsers/fields/id.rs +++ b/src/parsers/fields/id.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use crate::{parsers::MessageStream, HeaderValue}; diff --git a/src/parsers/fields/list.rs b/src/parsers/fields/list.rs index 1f2d142..3b72f40 100644 --- a/src/parsers/fields/list.rs +++ b/src/parsers/fields/list.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::borrow::Cow; diff --git a/src/parsers/fields/mod.rs b/src/parsers/fields/mod.rs index 60e9663..299c059 100644 --- a/src/parsers/fields/mod.rs +++ b/src/parsers/fields/mod.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ pub mod address; diff --git a/src/parsers/fields/raw.rs b/src/parsers/fields/raw.rs index 5bf5fc0..81c5a6e 100644 --- a/src/parsers/fields/raw.rs +++ b/src/parsers/fields/raw.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use crate::{parsers::MessageStream, HeaderValue}; diff --git a/src/parsers/fields/received.rs b/src/parsers/fields/received.rs index 8e4ce83..2f384f8 100644 --- a/src/parsers/fields/received.rs +++ b/src/parsers/fields/received.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; diff --git a/src/parsers/fields/thread.rs b/src/parsers/fields/thread.rs index de80df4..2630c0c 100644 --- a/src/parsers/fields/thread.rs +++ b/src/parsers/fields/thread.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ fn is_re_prefix(prefix: &str) -> bool { diff --git a/src/parsers/fields/unstructured.rs b/src/parsers/fields/unstructured.rs index 16792d8..b92367d 100644 --- a/src/parsers/fields/unstructured.rs +++ b/src/parsers/fields/unstructured.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::borrow::Cow; diff --git a/src/parsers/header.rs b/src/parsers/header.rs index dec4248..72ea207 100644 --- a/src/parsers/header.rs +++ b/src/parsers/header.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::borrow::Cow; diff --git a/src/parsers/message.rs b/src/parsers/message.rs index 4d44f68..926edd9 100644 --- a/src/parsers/message.rs +++ b/src/parsers/message.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level dir&ectory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::borrow::Cow; @@ -273,7 +268,7 @@ impl MessageParser { && part_headers .header_value(&HeaderName::ContentDisposition) .map_or(true, |d| { - !d.as_content_type().is_some_and( |ct| ct.is_attachment()) + !d.as_content_type().is_some_and(|ct| ct.is_attachment()) }) && (state.parts == 1 || state.mime_type != MimeType::MultipartRelated @@ -606,7 +601,7 @@ mod tests { for file_name in fs::read_dir(&test_dir).unwrap() { let mut file_name = file_name.unwrap().path(); - if file_name.extension().is_some_and( |e| e == "eml") { + if file_name.extension().is_some_and(|e| e == "eml") { let raw_original = fs::read(&file_name).unwrap(); tests_run += 1; diff --git a/src/parsers/mime.rs b/src/parsers/mime.rs index 7c5dfe2..e9631a5 100644 --- a/src/parsers/mime.rs +++ b/src/parsers/mime.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::borrow::Cow; diff --git a/src/parsers/mod.rs b/src/parsers/mod.rs index e9b1778..0f2574a 100644 --- a/src/parsers/mod.rs +++ b/src/parsers/mod.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::{iter::Peekable, ops::Range, slice::Iter}; diff --git a/src/parsers/preview.rs b/src/parsers/preview.rs index c540de9..7941618 100644 --- a/src/parsers/preview.rs +++ b/src/parsers/preview.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use std::borrow::Cow; diff --git a/tests/integration_test.rs b/tests/integration_test.rs index b3541fd..e394801 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -1,12 +1,7 @@ /* - * Copyright Stalwart Labs Ltd. See the COPYING - * file at the top-level directory of this distribution. + * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC * - * Licensed under the Apache License, Version 2.0 or the MIT license - * , at your - * option. This file may not be copied, modified, or distributed - * except according to those terms. + * SPDX-License-Identifier: Apache-2.0 OR MIT */ use mail_parser::*;