Move the actual logic of email parsing to EmailAddress::new() (#3656)

Very small PR; Motivation: Easier navigation using Go-To-definition.

Because, using go-to-definition of rust-analyzer on parse() doesn't take you to the actual parse() implementation but its trait definiton. On the other hand, it's very easy to find EmailAddress::new().
This commit is contained in:
Hocuri
2022-10-12 20:37:17 +02:00
committed by GitHub
parent 7ed947f598
commit 0e2445c7a0
6 changed files with 28 additions and 29 deletions

View File

@@ -740,7 +740,7 @@ impl SentMessage {
.split(' ')
.next()
.expect("no recipient found");
rcpt.parse().expect("failed to parse email address")
EmailAddress::new(rcpt).expect("failed to parse email address")
}
/// The raw message payload.