Skip to content

Commit

Permalink
chore: Run clippy (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
amaury1093 authored Oct 28, 2019
1 parent 68e999c commit 66f7d76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ impl Serialize for SingleEmail {
/// The main function: checks email format, checks MX records, and checks SMTP
/// responses to the email inbox.
pub fn email_exists(to_email: &str, from_email: &str) -> SingleEmail {
let from_email = EmailAddress::from_str(from_email).unwrap_or(
EmailAddress::from_str("[email protected]").expect("This is a valid email. qed."),
);
let from_email = EmailAddress::from_str(from_email).unwrap_or_else(|_| {
EmailAddress::from_str("[email protected]").expect("This is a valid email. qed.")
});

debug!("Checking email '{}'", to_email);
let my_syntax = match address_syntax(to_email) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub fn address_syntax(email_address: &str) -> Result<SyntaxDetails, SyntaxError>
};

let iter: &str = email_address.as_ref();
let mut iter = iter.split("@");
let mut iter = iter.split('@');
let username = iter
.next()
.expect("We checked above that email is valid. qed.")
Expand Down

0 comments on commit 66f7d76

Please sign in to comment.