mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 15:26:30 +03:00
configure/auto_mozilla: remove indexing
This commit is contained in:
committed by
Alexander Krotov
parent
9fcb30ac33
commit
ec089faf3a
@@ -43,11 +43,11 @@ fn parse_xml(in_emailaddr: &str, xml_raw: &str) -> Result<LoginParam, Error> {
|
|||||||
reader.trim_text(true);
|
reader.trim_text(true);
|
||||||
|
|
||||||
// Split address into local part and domain part.
|
// Split address into local part and domain part.
|
||||||
let p = in_emailaddr
|
let parts: Vec<&str> = in_emailaddr.rsplitn(2, '@').collect();
|
||||||
.find('@')
|
let (in_emaillocalpart, in_emaildomain) = match &parts[..] {
|
||||||
.ok_or_else(|| Error::InvalidEmailAddress(in_emailaddr.to_string()))?;
|
[domain, local] => (local, domain),
|
||||||
let (in_emaillocalpart, in_emaildomain) = in_emailaddr.split_at(p);
|
_ => return Err(Error::InvalidEmailAddress(in_emailaddr.to_string())),
|
||||||
let in_emaildomain = &in_emaildomain[1..];
|
};
|
||||||
|
|
||||||
let mut moz_ac = MozAutoconfigure {
|
let mut moz_ac = MozAutoconfigure {
|
||||||
in_emailaddr,
|
in_emailaddr,
|
||||||
|
|||||||
Reference in New Issue
Block a user