Skip to content

Commit bd3ad40

Browse files
committed
fix(clippy): Beta clippy lints
This will make CI green again
1 parent 37ebc2c commit bd3ad40

File tree

2 files changed

+29
-32
lines changed

2 files changed

+29
-32
lines changed

src/client.rs

+28-28
Original file line numberDiff line numberDiff line change
@@ -410,34 +410,34 @@ impl<T: Read + Write + Unpin + fmt::Debug + Send> Session<T> {
410410
/// - `INTERNALDATE`: The internal date of the message.
411411
/// - `BODY[<section>]`:
412412
///
413-
/// The text of a particular body section. The section specification is a set of zero or
414-
/// more part specifiers delimited by periods. A part specifier is either a part number
415-
/// (see RFC) or one of the following: `HEADER`, `HEADER.FIELDS`, `HEADER.FIELDS.NOT`,
416-
/// `MIME`, and `TEXT`. An empty section specification (i.e., `BODY[]`) refers to the
417-
/// entire message, including the header.
418-
///
419-
/// The `HEADER`, `HEADER.FIELDS`, and `HEADER.FIELDS.NOT` part specifiers refer to the
420-
/// [RFC-2822](https://tools.ietf.org/html/rfc2822) header of the message or of an
421-
/// encapsulated [MIME-IMT](https://tools.ietf.org/html/rfc2046)
422-
/// MESSAGE/[RFC822](https://tools.ietf.org/html/rfc822) message. `HEADER.FIELDS` and
423-
/// `HEADER.FIELDS.NOT` are followed by a list of field-name (as defined in
424-
/// [RFC-2822](https://tools.ietf.org/html/rfc2822)) names, and return a subset of the
425-
/// header. The subset returned by `HEADER.FIELDS` contains only those header fields with
426-
/// a field-name that matches one of the names in the list; similarly, the subset returned
427-
/// by `HEADER.FIELDS.NOT` contains only the header fields with a non-matching field-name.
428-
/// The field-matching is case-insensitive but otherwise exact. Subsetting does not
429-
/// exclude the [RFC-2822](https://tools.ietf.org/html/rfc2822) delimiting blank line
430-
/// between the header and the body; the blank line is included in all header fetches,
431-
/// except in the case of a message which has no body and no blank line.
432-
///
433-
/// The `MIME` part specifier refers to the [MIME-IMB](https://tools.ietf.org/html/rfc2045)
434-
/// header for this part.
435-
///
436-
/// The `TEXT` part specifier refers to the text body of the message,
437-
/// omitting the [RFC-2822](https://tools.ietf.org/html/rfc2822) header.
438-
///
439-
/// [`Flag::Seen`] is implicitly set when `BODY` is fetched; if this causes the flags to
440-
/// change, they will generally be included as part of the `FETCH` responses.
413+
/// The text of a particular body section. The section specification is a set of zero or
414+
/// more part specifiers delimited by periods. A part specifier is either a part number
415+
/// (see RFC) or one of the following: `HEADER`, `HEADER.FIELDS`, `HEADER.FIELDS.NOT`,
416+
/// `MIME`, and `TEXT`. An empty section specification (i.e., `BODY[]`) refers to the
417+
/// entire message, including the header.
418+
///
419+
/// The `HEADER`, `HEADER.FIELDS`, and `HEADER.FIELDS.NOT` part specifiers refer to the
420+
/// [RFC-2822](https://tools.ietf.org/html/rfc2822) header of the message or of an
421+
/// encapsulated [MIME-IMT](https://tools.ietf.org/html/rfc2046)
422+
/// MESSAGE/[RFC822](https://tools.ietf.org/html/rfc822) message. `HEADER.FIELDS` and
423+
/// `HEADER.FIELDS.NOT` are followed by a list of field-name (as defined in
424+
/// [RFC-2822](https://tools.ietf.org/html/rfc2822)) names, and return a subset of the
425+
/// header. The subset returned by `HEADER.FIELDS` contains only those header fields with
426+
/// a field-name that matches one of the names in the list; similarly, the subset returned
427+
/// by `HEADER.FIELDS.NOT` contains only the header fields with a non-matching field-name.
428+
/// The field-matching is case-insensitive but otherwise exact. Subsetting does not
429+
/// exclude the [RFC-2822](https://tools.ietf.org/html/rfc2822) delimiting blank line
430+
/// between the header and the body; the blank line is included in all header fetches,
431+
/// except in the case of a message which has no body and no blank line.
432+
///
433+
/// The `MIME` part specifier refers to the [MIME-IMB](https://tools.ietf.org/html/rfc2045)
434+
/// header for this part.
435+
///
436+
/// The `TEXT` part specifier refers to the text body of the message,
437+
/// omitting the [RFC-2822](https://tools.ietf.org/html/rfc2822) header.
438+
///
439+
/// [`Flag::Seen`] is implicitly set when `BODY` is fetched; if this causes the flags to
440+
/// change, they will generally be included as part of the `FETCH` responses.
441441
/// - `BODY.PEEK[<section>]`: An alternate form of `BODY[<section>]` that does not implicitly
442442
/// set [`Flag::Seen`].
443443
/// - `ENVELOPE`: The envelope structure of the message. This is computed by the server by

src/types/fetch.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,7 @@ impl Fetch {
206206
})
207207
.next()
208208
.and_then(
209-
|date_time| match DateTime::parse_from_str(date_time, DATE_TIME_FORMAT) {
210-
Ok(date_time) => Some(date_time),
211-
Err(_) => None,
212-
},
209+
|date_time| DateTime::parse_from_str(date_time, DATE_TIME_FORMAT).ok(),
213210
)
214211
} else {
215212
unreachable!()

0 commit comments

Comments
 (0)