Skip to content

Commit 695ca91

Browse files
authored
chore: bump edition for all crates to 2024 (#163)
1 parent 85975e1 commit 695ca91

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+227
-218
lines changed

api/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "api"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55

66
[lib]
77
path = "src/lib.rs"

api/src/authentication.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
use actix_web::{dev::ServiceRequest, web::Data, Error};
1+
use actix_web::{Error, dev::ServiceRequest, web::Data};
22
use actix_web_httpauth::extractors::{
3-
bearer::{BearerAuth, Config},
43
AuthenticationError,
4+
bearer::{BearerAuth, Config},
55
};
66
use constant_time_eq::constant_time_eq_n;
77

api/src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
use base64::{prelude::BASE64_STANDARD, Engine};
1+
use base64::{Engine, prelude::BASE64_STANDARD};
22
use config::shared::PgConnectionConfig;
33
use serde::de::{MapAccess, Visitor};
4-
use serde::{de, Deserialize, Deserializer};
4+
use serde::{Deserialize, Deserializer, de};
55
use std::fmt;
66
use thiserror::Error;
77

api/src/db/destinations.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
use config::shared::DestinationConfig;
21
use config::SerializableSecretString;
2+
use config::shared::DestinationConfig;
33
use secrecy::ExposeSecret;
44
use serde::{Deserialize, Serialize};
55
use sqlx::{PgPool, Postgres, Transaction};
66
use std::fmt::Debug;
77
use thiserror::Error;
88

99
use crate::db::serde::{
10-
decrypt_and_deserialize_from_value, encrypt_and_serialize, DbDeserializationError,
11-
DbSerializationError,
10+
DbDeserializationError, DbSerializationError, decrypt_and_deserialize_from_value,
11+
encrypt_and_serialize,
1212
};
1313
use crate::encryption::{
14-
decrypt_text, encrypt_text, Decrypt, DecryptionError, Encrypt, EncryptedValue, EncryptionError,
15-
EncryptionKey,
14+
Decrypt, DecryptionError, Encrypt, EncryptedValue, EncryptionError, EncryptionKey,
15+
decrypt_text, encrypt_text,
1616
};
1717

1818
impl Encrypt<EncryptedDestinationConfig> for DestinationConfig {
@@ -300,8 +300,8 @@ pub async fn destination_exists(
300300
#[cfg(test)]
301301
mod tests {
302302
use aws_lc_rs::aead::RandomizedNonceKey;
303-
use config::shared::DestinationConfig;
304303
use config::SerializableSecretString;
304+
use config::shared::DestinationConfig;
305305

306306
use crate::db::destinations::EncryptedDestinationConfig;
307307
use crate::db::serde::{decrypt_and_deserialize_from_value, encrypt_and_serialize};

api/src/db/destinations_pipelines.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ use sqlx::PgPool;
33
use thiserror::Error;
44

55
use crate::db::destinations::{
6-
create_destination_txn, update_destination_txn, DestinationsDbError,
6+
DestinationsDbError, create_destination_txn, update_destination_txn,
77
};
88
use crate::db::pipelines::{
9-
create_pipeline_txn, update_pipeline_txn, PipelineConfig, PipelinesDbError,
9+
PipelineConfig, PipelinesDbError, create_pipeline_txn, update_pipeline_txn,
1010
};
1111
use crate::db::serde::{
12-
encrypt_and_serialize, serialize, DbDeserializationError, DbSerializationError,
12+
DbDeserializationError, DbSerializationError, encrypt_and_serialize, serialize,
1313
};
1414
use crate::encryption::EncryptionKey;
1515

api/src/db/pipelines.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ use serde::{Deserialize, Serialize};
33
use sqlx::{PgPool, Postgres, Transaction};
44
use thiserror::Error;
55

6-
use crate::db::replicators::{create_replicator_txn, ReplicatorsDbError};
6+
use crate::db::replicators::{ReplicatorsDbError, create_replicator_txn};
77
use crate::db::serde::{
8-
deserialize_from_value, serialize, DbDeserializationError, DbSerializationError,
8+
DbDeserializationError, DbSerializationError, deserialize_from_value, serialize,
99
};
1010

1111
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -277,7 +277,7 @@ pub async fn read_all_pipelines(
277277
/// Helper function to check if an sqlx error is a duplicate pipeline constraint violation
278278
pub fn is_duplicate_pipeline_error(err: &sqlx::Error) -> bool {
279279
match err {
280-
sqlx::Error::Database(ref db_err) => {
280+
sqlx::Error::Database(db_err) => {
281281
// 23505 is PostgreSQL's unique constraint violation code
282282
// Check for our unique constraint name defined
283283
// in the migrations/20250605064229_add_unique_constraint_pipelines_source_destination.sql file

api/src/db/publications.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use pg_escape::{quote_identifier, quote_literal};
22
use serde::Serialize;
3-
use sqlx::{postgres::PgConnectOptions, Connection, Executor, PgConnection, Row};
3+
use sqlx::{Connection, Executor, PgConnection, Row, postgres::PgConnectOptions};
44
use std::collections::HashMap;
55
use thiserror::Error;
66
use utoipa::ToSchema;

api/src/db/serde.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use serde::de::DeserializeOwned;
21
use serde::Serialize;
2+
use serde::de::DeserializeOwned;
33
use thiserror::Error;
44

55
use crate::encryption::{Decrypt, DecryptionError, Encrypt, EncryptionError, EncryptionKey};

api/src/db/sources.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
use config::shared::{PgConnectionConfig, TlsConfig};
21
use config::SerializableSecretString;
2+
use config::shared::{PgConnectionConfig, TlsConfig};
33
use secrecy::ExposeSecret;
44
use serde::{Deserialize, Serialize};
55
use sqlx::{PgPool, Postgres, Transaction};
66
use std::fmt::Debug;
77
use thiserror::Error;
88

99
use crate::db::serde::{
10-
decrypt_and_deserialize_from_value, encrypt_and_serialize, DbDeserializationError,
11-
DbSerializationError,
10+
DbDeserializationError, DbSerializationError, decrypt_and_deserialize_from_value,
11+
encrypt_and_serialize,
1212
};
1313
use crate::encryption::{
14-
decrypt_text, encrypt_text, Decrypt, DecryptionError, Encrypt, EncryptedValue, EncryptionError,
15-
EncryptionKey,
14+
Decrypt, DecryptionError, Encrypt, EncryptedValue, EncryptionError, EncryptionKey,
15+
decrypt_text, encrypt_text,
1616
};
1717

1818
#[derive(Debug, Clone, Serialize, Deserialize)]

api/src/db/tables.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use serde::{Deserialize, Serialize};
2-
use sqlx::{postgres::PgConnectOptions, Connection, Executor, PgConnection, Row};
2+
use sqlx::{Connection, Executor, PgConnection, Row, postgres::PgConnectOptions};
33
use thiserror::Error;
44

55
#[derive(Debug, Error)]

0 commit comments

Comments
 (0)