mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 14:36:29 +03:00
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:
@@ -396,7 +396,7 @@ UPDATE chats SET protected=1, type=120 WHERE type=130;"#,
|
||||
if dbversion < 71 {
|
||||
info!(context, "[migration] v71");
|
||||
if let Ok(addr) = context.get_primary_self_addr().await {
|
||||
if let Ok(domain) = addr.parse::<EmailAddress>().map(|email| email.domain) {
|
||||
if let Ok(domain) = EmailAddress::new(&addr).map(|email| email.domain) {
|
||||
context
|
||||
.set_config(
|
||||
Config::ConfiguredProvider,
|
||||
|
||||
Reference in New Issue
Block a user