style(all): Run clippy without errors

This commit is contained in:
Alexis Mousset
2017-05-21 13:09:31 +02:00
parent 3b4434467a
commit 73c5630634
7 changed files with 18 additions and 42 deletions

View File

@@ -1,30 +0,0 @@
extern crate lettre;
use lettre::email::EmailBuilder;
use lettre::transport::EmailTransport;
use lettre::transport::smtp::SmtpTransportBuilder;
fn main() {
let email = EmailBuilder::new()
// Addresses can be specified by the tuple (email, alias)
.to(("user@example.org", "Firstname Lastname"))
// ... or by an address only
.from("user@example.com")
.subject("Hi, Hello world")
.text("Hello world.")
.build()
.unwrap();
// Open a local connection on port 25
let mut mailer = SmtpTransportBuilder::localhost().unwrap().build();
// Send the email
let result = mailer.send(email);
if result.is_ok() {
println!("Email sent");
} else {
println!("Could not send email: {:?}", result);
}
assert!(result.is_ok());
}