Skip to content

Commit

Permalink
fix clippy errors after rust update
Browse files Browse the repository at this point in the history
  • Loading branch information
dirksammel committed Sep 10, 2024
1 parent a02d8b3 commit ef05436
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 22 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Dependencies: Update black from 24.4.2 to 24.8.0 ([@dirksammel](https://github.com/dirksammel))
- Dependencies: Update crate-ci/typos from 1.23.3 to 1.23.7 ([@dirksammel](https://github.com/dirksammel))
- Dependencies: Update cryptography from 43.0.0 to 43.0.1 ([@dirksammel](https://github.com/dirksammel))
- Dependencies: Update EmbarkStudios/cargo-deny-action from 1 to 2 ([@dirksammel](https://github.com/dirksammel))
- Dependencies: Update mypy from 1.11.0 to 1.11.1 ([@dirksammel](https://github.com/dirksammel))
- Dependencies: Update pytest from 8.3.1 to 8.3.2 ([@dirksammel](https://github.com/dirksammel))
Expand Down
18 changes: 9 additions & 9 deletions auditor-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ impl AuditorClient {
pub async fn health_check(&self) -> bool {
match self
.client
.get(&format!("{}/health_check", &self.address))
.get(format!("{}/health_check", &self.address))
.send()
.await
{
Expand All @@ -1244,7 +1244,7 @@ impl AuditorClient {
pub async fn add(&self, record: &RecordAdd) -> Result<(), ClientError> {
let response = self
.client
.post(&format!("{}/record", &self.address))
.post(format!("{}/record", &self.address))
.header("Content-Type", "application/json")
.json(record)
.send()
Expand All @@ -1270,7 +1270,7 @@ impl AuditorClient {
pub async fn bulk_insert(&self, records: &Vec<RecordAdd>) -> Result<(), ClientError> {
let response = self
.client
.post(&format!("{}/records", &self.address))
.post(format!("{}/records", &self.address))
.header("Content-Type", "application/json")
.json(records)
.send()
Expand All @@ -1296,7 +1296,7 @@ impl AuditorClient {
)]
pub async fn update(&self, record: &RecordUpdate) -> Result<(), ClientError> {
self.client
.put(&format!("{}/record", &self.address))
.put(format!("{}/record", &self.address))
.header("Content-Type", "application/json")
.json(record)
.send()
Expand All @@ -1314,7 +1314,7 @@ impl AuditorClient {
pub async fn get(&self) -> Result<Vec<Record>, ClientError> {
Ok(self
.client
.get(&format!("{}/records", &self.address))
.get(format!("{}/records", &self.address))
.send()
.await?
.error_for_status()?
Expand Down Expand Up @@ -1342,7 +1342,7 @@ impl AuditorClient {
let encoded_since = encode(&since_str);
Ok(self
.client
.get(&format!(
.get(format!(
"{}/records?start_time[gte]={}",
&self.address, encoded_since
))
Expand Down Expand Up @@ -1372,7 +1372,7 @@ impl AuditorClient {
let encoded_since = encode(&since_str);
Ok(self
.client
.get(&format!(
.get(format!(
"{}/records?stop_time[gte]={}",
&self.address, encoded_since
))
Expand All @@ -1395,7 +1395,7 @@ impl AuditorClient {
pub async fn advanced_query(&self, query_string: String) -> Result<Vec<Record>, ClientError> {
Ok(self
.client
.get(&format!("{}/records?{}", &self.address, query_string))
.get(format!("{}/records?{}", &self.address, query_string))
.send()
.await?
.error_for_status()?
Expand All @@ -1415,7 +1415,7 @@ impl AuditorClient {
pub async fn get_single_record(&self, record_id: String) -> Result<Record, ClientError> {
Ok(self
.client
.get(&format!("{}/record/{}", &self.address, record_id))
.get(format!("{}/record/{}", &self.address, record_id))
.send()
.await?
.error_for_status()?
Expand Down
2 changes: 1 addition & 1 deletion auditor/tests/api/get_since.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ async fn get_wrong_since_returns_a_404() {
let app = spawn_app().await;

let response = reqwest::Client::new()
.get(&format!(
.get(format!(
"{}/get/wrong/since/2022-03-01T13:00:00-00:00",
&app.address
))
Expand Down
14 changes: 7 additions & 7 deletions auditor/tests/api/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl TestApp {

pub async fn add_record<T: serde::Serialize>(&self, record: &T) -> reqwest::Response {
reqwest::Client::new()
.post(&format!("{}/record", &self.address))
.post(format!("{}/record", &self.address))
.header("Content-Type", "application/json")
.json(record)
.send()
Expand All @@ -46,7 +46,7 @@ impl TestApp {

pub async fn bulk_insert<T: serde::Serialize>(&self, record: &T) -> reqwest::Response {
reqwest::Client::new()
.post(&format!("{}/records", &self.address))
.post(format!("{}/records", &self.address))
.header("Content-Type", "application/json")
.json(record)
.send()
Expand All @@ -56,7 +56,7 @@ impl TestApp {

pub async fn get_records(&self) -> reqwest::Response {
reqwest::Client::new()
.get(&format!("{}/records", &self.address))
.get(format!("{}/records", &self.address))
.send()
.await
.expect("Failed to execute request.")
Expand All @@ -69,7 +69,7 @@ impl TestApp {
let timestamp_str = timestamp.as_ref();
let encoded_since = encode(timestamp_str);
reqwest::Client::new()
.get(&format!(
.get(format!(
"{}/records?start_time[gte]={}",
&self.address, encoded_since
))
Expand All @@ -85,7 +85,7 @@ impl TestApp {
let timestamp_str = timestamp.as_ref();
let encoded_since = encode(timestamp_str);
reqwest::Client::new()
.get(&format!(
.get(format!(
"{}/records?stop_time[gte]={}",
&self.address, encoded_since
))
Expand All @@ -99,7 +99,7 @@ impl TestApp {
query_string: T,
) -> reqwest::Response {
reqwest::Client::new()
.get(&format!("{}/records?{}", &self.address, query_string))
.get(format!("{}/records?{}", &self.address, query_string))
.send()
.await
.expect("Failed to execute queries.")
Expand All @@ -110,7 +110,7 @@ impl TestApp {
record_id: T,
) -> reqwest::Response {
reqwest::Client::new()
.get(&format!("{}/record/{}", &self.address, record_id))
.get(format!("{}/record/{}", &self.address, record_id))
.send()
.await
.expect("Failed to execute queries.")
Expand Down
6 changes: 3 additions & 3 deletions auditor/tests/api/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async fn update_returns_a_404_for_non_existing_record() {
let body: RecordTest = Faker.fake();

let response = client
.put(&format!("{}/record", &app.address))
.put(format!("{}/record", &app.address))
.header("Content-Type", "application/json")
.json(&body)
.send()
Expand All @@ -35,7 +35,7 @@ async fn update_returns_a_200_for_valid_form_data() {
body.stop_time = None;

let response = client
.post(&format!("{}/record", &app.address))
.post(format!("{}/record", &app.address))
.header("Content-Type", "application/json")
.json(&body)
.send()
Expand All @@ -48,7 +48,7 @@ async fn update_returns_a_200_for_valid_form_data() {
let body = body.with_stop_time("2022-03-01T13:00:00-00:00");

let response = client
.put(&format!("{}/record", &app.address))
.put(format!("{}/record", &app.address))
.header("Content-Type", "application/json")
.json(&body)
.send()
Expand Down
2 changes: 1 addition & 1 deletion plugins/apel/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ requires-python = ">=3.8"
dependencies = [
"python-auditor==0.6.2",
"requests==2.32.3",
"cryptography==43.0.1",
"cryptography==43.0.0",
"pyyaml==6.0.2",
"pydantic==2.8.2",
]
Expand Down

0 comments on commit ef05436

Please sign in to comment.