fmt: unwraps changed to ?

This commit is contained in:
silver 2024-09-17 22:13:30 +01:00
parent f3ef03a418
commit bf08aa650c
Signed by: silver
GPG key ID: 36F93D61BAD3FD7D
2 changed files with 2 additions and 2 deletions

View file

@ -172,7 +172,7 @@ pub mod link {
let creds = Credentials::new(config.mail_user.clone(), config.mail_pass.clone()); let creds = Credentials::new(config.mail_user.clone(), config.mail_pass.clone());
// Open a remote connection to gmail using STARTTLS // Open a remote connection to gmail using STARTTLS
let mailer = SmtpTransport::starttls_relay(&config.mail_smtp).unwrap().credentials(creds).build(); let mailer = SmtpTransport::starttls_relay(&config.mail_smtp)?.credentials(creds).build();
// Send the email // Send the email
mailer.send(&email) mailer.send(&email)

View file

@ -184,7 +184,7 @@ pub mod link {
let creds = Credentials::new(config.mail_user.clone(), config.mail_pass.clone()); let creds = Credentials::new(config.mail_user.clone(), config.mail_pass.clone());
// Open a remote connection to gmail using STARTTLS // Open a remote connection to gmail using STARTTLS
let mailer = SmtpTransport::starttls_relay(&config.mail_smtp).unwrap().credentials(creds).build(); let mailer = SmtpTransport::starttls_relay(&config.mail_smtp)?.credentials(creds).build();
// Send the email // Send the email
mailer.send(&email) mailer.send(&email)