mirror of
https://github.com/LukeMathWalker/zero-to-production.git
synced 2025-03-06 19:31:40 +00:00
Fix clippy errors
This commit is contained in:
parent
e634386e08
commit
9d13e57f4e
5 changed files with 7 additions and 7 deletions
|
@ -41,7 +41,7 @@ impl DatabaseSettings {
|
|||
PgConnectOptions::new()
|
||||
.host(&self.host)
|
||||
.username(&self.username)
|
||||
.password(&self.password.expose_secret())
|
||||
.password(self.password.expose_secret())
|
||||
.port(self.port)
|
||||
.ssl_mode(ssl_mode)
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn names_containing_an_invalid_character_are_rejected() {
|
||||
for name in vec!['/', '(', ')', '"', '<', '>', '\\', '{', '}'] {
|
||||
for name in &['/', '(', ')', '"', '<', '>', '\\', '{', '}'] {
|
||||
let name = name.to_string();
|
||||
assert_err!(SubscriberName::parse(name));
|
||||
}
|
||||
|
|
|
@ -62,8 +62,8 @@ impl TestApp {
|
|||
confirmation_link
|
||||
};
|
||||
|
||||
let html = get_link(&body["HtmlBody"].as_str().unwrap());
|
||||
let plain_text = get_link(&body["TextBody"].as_str().unwrap());
|
||||
let html = get_link(body["HtmlBody"].as_str().unwrap());
|
||||
let plain_text = get_link(body["TextBody"].as_str().unwrap());
|
||||
ConfirmationLinks { html, plain_text }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ async fn subscribe_sends_a_confirmation_email_with_a_link() {
|
|||
|
||||
// Assert
|
||||
let email_request = &app.email_server.received_requests().await.unwrap()[0];
|
||||
let confirmation_links = app.get_confirmation_links(&email_request);
|
||||
let confirmation_links = app.get_confirmation_links(email_request);
|
||||
|
||||
// The two links should be identical
|
||||
assert_eq!(confirmation_links.html, confirmation_links.plain_text);
|
||||
|
|
|
@ -30,7 +30,7 @@ async fn the_link_returned_by_subscribe_returns_a_200_if_called() {
|
|||
|
||||
app.post_subscriptions(body.into()).await;
|
||||
let email_request = &app.email_server.received_requests().await.unwrap()[0];
|
||||
let confirmation_links = app.get_confirmation_links(&email_request);
|
||||
let confirmation_links = app.get_confirmation_links(email_request);
|
||||
|
||||
// Act
|
||||
let response = reqwest::get(confirmation_links.html).await.unwrap();
|
||||
|
@ -53,7 +53,7 @@ async fn clicking_on_the_confirmation_link_confirms_a_subscriber() {
|
|||
|
||||
app.post_subscriptions(body.into()).await;
|
||||
let email_request = &app.email_server.received_requests().await.unwrap()[0];
|
||||
let confirmation_links = app.get_confirmation_links(&email_request);
|
||||
let confirmation_links = app.get_confirmation_links(email_request);
|
||||
|
||||
// Act
|
||||
reqwest::get(confirmation_links.html)
|
||||
|
|
Loading…
Reference in a new issue