Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Run clippy for all targets
Browse files Browse the repository at this point in the history
  • Loading branch information
0rzech committed Mar 18, 2024
1 parent 2fa8c3e commit b0fc434
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
sudo apt-get install --no-install-recommends -y libpq-dev
SKIP_PODMAN=true ./scripts/init_db.sh
- name: Linting
run: cargo clippy -- -D warnings
run: cargo clippy --all-targets -- -D warnings

coverage:
name: Code coverage
Expand Down
2 changes: 1 addition & 1 deletion scripts/git-hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
set -euxo pipefail

cargo sqlx prepare --workspace --check
cargo clippy -- --deny warnings
cargo clippy --all-targets -- --deny warnings
cargo test
cargo fmt
10 changes: 5 additions & 5 deletions tests/api/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static TRACING: Lazy<()> = Lazy::new(|| {
}
});

static FAILED_TO_EXECUTE_REQUEST: &'static str = "Failed to execute request";
static FAILED_TO_EXECUTE_REQUEST: &str = "Failed to execute request";

pub struct TestApp {
pub address: SocketAddr,
Expand Down Expand Up @@ -107,15 +107,15 @@ impl TestApp {
assert_eq!(links.len(), 1);

let raw_link = links[0].as_str();
let mut link = reqwest::Url::from_str(&raw_link).unwrap();
let mut link = reqwest::Url::from_str(raw_link).unwrap();
assert_some_eq!(link.host_str(), "localhost");

link.set_port(Some(self.address.port())).unwrap();
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 }
}
Expand All @@ -134,7 +134,7 @@ async fn configure_database(configuration: &DatabaseSettings) -> PgPool {
.await
.expect("Failed to create database");

let pool = get_connection_pool(&configuration);
let pool = get_connection_pool(configuration);

sqlx::migrate!("./migrations")
.run(&pool)
Expand Down
2 changes: 1 addition & 1 deletion tests/api/subscriptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ async fn subscribe_sends_a_confirmation_email_on_repeated_calls() {
for i in 1..4 {
// when
let body = format!("name=Imi%C4%99%20Nazwisko%20{i}&email=imie.nazwisko.{i}%40example.com");
let response = app.post_subscriptions(body.into()).await;
let response = app.post_subscriptions(body).await;

// then
assert_eq!(
Expand Down

0 comments on commit b0fc434

Please sign in to comment.