diff --git a/src/authentication.rs b/src/authentication.rs index d99237b..ae74823 100644 --- a/src/authentication.rs +++ b/src/authentication.rs @@ -103,11 +103,11 @@ impl Mechanism { let decoded_challenge = challenge.ok_or(Error::Client("This mechanism does expect a challenge"))?; - if vec!["User Name", "Username:", "Username"].contains(&decoded_challenge) { + if ["User Name", "Username:", "Username"].contains(&decoded_challenge) { return Ok(credentials.authentication_identity.to_string()); } - if vec!["Password", "Password:"].contains(&decoded_challenge) { + if ["Password", "Password:"].contains(&decoded_challenge) { return Ok(credentials.secret.to_string()); } diff --git a/src/smtp_client.rs b/src/smtp_client.rs index 0dc3697..4770d86 100644 --- a/src/smtp_client.rs +++ b/src/smtp_client.rs @@ -262,7 +262,7 @@ impl SmtpTransport { // Log the message debug!( "status=sent ({})", - result.message.get(0).unwrap_or(&"no response".to_string()) + result.message.first().unwrap_or(&"no response".to_string()) ); }