Skip to content

Commit 754d5eb

Browse files
build(deps): bump sqlx from 0.7.4 to 0.8.0 (#68)
* build(deps): bump sqlx from 0.7.4 to 0.8.0 Bumps [sqlx](https://github.com/launchbadge/sqlx) from 0.7.4 to 0.8.0. - [Changelog](https://github.com/launchbadge/sqlx/blob/main/CHANGELOG.md) - [Commits](launchbadge/sqlx@v0.7.4...v0.8.0) --- updated-dependencies: - dependency-name: sqlx dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * build: align code to sqlx 8.0 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kuba Sładek <jakub.sladek@zoho.com>
1 parent 7158afd commit 754d5eb

File tree

8 files changed

+424
-445
lines changed

8 files changed

+424
-445
lines changed

Cargo.lock

Lines changed: 411 additions & 432 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ regex = "1.10.6"
2222
reqwest = { version = "0.12.5", features = ["json"] }
2323
serde = { version = "1.0.205", features = ["derive"] }
2424
serde_json = { version = "1.0.122", features = ["raw_value"] }
25-
sqlx = { version = "0.7", features = ["runtime-tokio", "postgres", "chrono"] }
25+
sqlx = { version = "0.8", features = ["runtime-tokio", "postgres", "chrono"] }
2626
svix-ksuid = { version = "^0.8.0", features = ["serde"] }
2727
tokio = { version = "1.39.2", features = ["full"] }
2828
url = "2.5.2"

server/src/types/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ macro_rules! make_ksuid {
9393
}
9494

9595
impl sqlx::Decode<'_, sqlx::Postgres> for $name {
96-
fn decode(value: <sqlx::Postgres as sqlx::database::HasValueRef<'_>>::ValueRef) -> Result<Self, sqlx::error::BoxDynError> {
96+
fn decode(value: <sqlx::Postgres as sqlx::database::Database>::ValueRef<'_>) -> Result<Self, sqlx::error::BoxDynError> {
9797
let value = <&str as sqlx::Decode<sqlx::Postgres>>::decode(value)?;
9898

9999
Ok(Self(value.as_bytes().try_into().unwrap()))
@@ -111,10 +111,10 @@ macro_rules! make_ksuid {
111111
}
112112

113113
impl sqlx::Encode<'_, sqlx::Postgres> for $name {
114-
fn encode_by_ref(&self, buf: &mut <sqlx::Postgres as sqlx::database::HasArguments<'_>>::ArgumentBuffer) -> sqlx::encode::IsNull {
114+
fn encode_by_ref(&self, buf: &mut <sqlx::Postgres as sqlx::database::Database>::ArgumentBuffer<'_>) -> Result<sqlx::encode::IsNull, Box<(dyn serde::ser::StdError + Send + Sync + 'static)>> {
115115
buf.extend(self.0);
116116

117-
sqlx::encode::IsNull::No
117+
Ok(sqlx::encode::IsNull::No)
118118
}
119119
}
120120
};

server/tests/api/create_application.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ async fn application_is_created() {
1212

1313
// Act
1414
let response = Client::new()
15-
.post(&server.url("application"))
15+
.post(server.url("application"))
1616
.json(&json!({
1717
"name": "Dummy application"
1818
}))
@@ -46,7 +46,7 @@ async fn application_names_can_be_without_space() {
4646

4747
// Act
4848
let response = Client::new()
49-
.post(&server.url("application"))
49+
.post(server.url("application"))
5050
.json(&json!({
5151
"name": "test"
5252
}))
@@ -77,7 +77,7 @@ async fn validation() {
7777
for test_case in test_cases {
7878
// Act
7979
let response = Client::new()
80-
.post(&server.url("application"))
80+
.post(server.url("application"))
8181
.json(&test_case.0)
8282
.send()
8383
.await

server/tests/api/create_endpoint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async fn endpoint_is_created() {
1515

1616
// Act
1717
let response = Client::new()
18-
.post(&server.url(&format!("application/{}/endpoint", app_id)))
18+
.post(server.url(&format!("application/{}/endpoint", app_id)))
1919
.json(&json!({
2020
"url": "http://localhost:8080",
2121
"topics": [
@@ -105,7 +105,7 @@ async fn validation() {
105105
for test_case in test_cases {
106106
// Act
107107
let response = Client::new()
108-
.post(&server.url(&format!("application/{}/endpoint", test_case.0)))
108+
.post(server.url(&format!("application/{}/endpoint", test_case.0)))
109109
.json(&test_case.1)
110110
.send()
111111
.await

server/tests/api/create_event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async fn event_is_created_and_dispatched() {
4242

4343
// Act
4444
let response = Client::new()
45-
.post(&server.url(&format!("application/{}/event", app_id)))
45+
.post(server.url(&format!("application/{}/event", app_id)))
4646
.json(&json!({
4747
"topic": topic,
4848
"payload": payload

server/tests/api/endpoint_status.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ async fn endpoint_can_be_disabled() {
1717

1818
// Act
1919
let response = Client::new()
20-
.post(&server.url(&format!(
20+
.post(server.url(&format!(
2121
"application/{}/endpoint/{}/disable",
2222
app_id, endpoint_id
2323
)))
@@ -49,7 +49,7 @@ async fn endpoint_can_be_enabled() {
4949

5050
// Act
5151
let response = Client::new()
52-
.post(&server.url(&format!(
52+
.post(server.url(&format!(
5353
"application/{}/endpoint/{}/enable",
5454
app_id, endpoint_id
5555
)))

server/tests/api/health_check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ async fn health_check_works() {
99

1010
// Act
1111
let response = Client::new()
12-
.get(&server.url("health_check"))
12+
.get(server.url("health_check"))
1313
.send()
1414
.await
1515
.expect("Failed to executed request");

0 commit comments

Comments
 (0)