Skip to content

Commit 812c713

Browse files
Update Rust crate diesel to 2.2.2 (#6236)
1 parent b29529c commit 812c713

File tree

5 files changed

+29
-16
lines changed

5 files changed

+29
-16
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,8 @@ db-macros = { path = "nexus/db-macros" }
314314
debug-ignore = "1.0.5"
315315
derive_more = "0.99.18"
316316
derive-where = "1.2.7"
317-
diesel = { version = "2.1.6", features = ["postgres", "r2d2", "chrono", "serde_json", "network-address", "uuid"] }
317+
# Having the i-implement-... feature here makes diesel go away from the workspace-hack
318+
diesel = { version = "2.2.2", features = ["i-implement-a-third-party-backend-and-opt-into-breaking-changes", "postgres", "r2d2", "chrono", "serde_json", "network-address", "uuid"] }
318319
diesel-dtrace = { git = "https://github.com/oxidecomputer/diesel-dtrace", branch = "main" }
319320
dns-server = { path = "dns-server" }
320321
dns-server-api = { path = "dns-server-api" }

nexus/db-model/src/tuf_repo.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,10 @@ impl FromSql<diesel::sql_types::Text, diesel::pg::Pg> for ArtifactHash {
307307
fn from_sql(
308308
bytes: diesel::pg::PgValue<'_>,
309309
) -> diesel::deserialize::Result<Self> {
310-
let s = String::from_sql(bytes)?;
310+
let s =
311+
<String as FromSql<diesel::sql_types::Text, diesel::pg::Pg>>::from_sql(
312+
bytes,
313+
)?;
311314
ExternalArtifactHash::from_str(&s)
312315
.map(ArtifactHash)
313316
.map_err(|e| e.into())

nexus/db-queries/src/db/datastore/sled.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ impl DataStore {
272272
);
273273
}
274274

275-
sql_function!(fn random() -> diesel::sql_types::Float);
275+
define_sql_function!(fn random() -> diesel::sql_types::Float);
276276

277277
// We only actually care about one target here, so this
278278
// query should have a `.limit(1)` attached. We fetch all

workspace-hack/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ crossbeam-utils = { version = "0.8.19" }
4141
crossterm = { version = "0.27.0", features = ["event-stream", "serde"] }
4242
crypto-common = { version = "0.1.6", default-features = false, features = ["getrandom", "std"] }
4343
der = { version = "0.7.9", default-features = false, features = ["derive", "flagset", "oid", "pem", "std"] }
44-
diesel = { version = "2.1.6", features = ["chrono", "i-implement-a-third-party-backend-and-opt-into-breaking-changes", "network-address", "postgres", "r2d2", "serde_json", "uuid"] }
4544
digest = { version = "0.10.7", features = ["mac", "oid", "std"] }
4645
either = { version = "1.13.0" }
4746
elliptic-curve = { version = "0.13.8", features = ["ecdh", "hazmat", "pem", "std"] }
@@ -65,7 +64,6 @@ hmac = { version = "0.12.1", default-features = false, features = ["reset"] }
6564
hyper = { version = "0.14.30", features = ["full"] }
6665
indexmap = { version = "2.3.0", features = ["serde"] }
6766
inout = { version = "0.1.3", default-features = false, features = ["std"] }
68-
ipnetwork = { version = "0.20.0", features = ["schemars"] }
6967
itertools-5ef9efb8ec2df382 = { package = "itertools", version = "0.12.1" }
7068
itertools-93f6ce9d446188ac = { package = "itertools", version = "0.10.5" }
7169
lalrpop-util = { version = "0.19.12" }
@@ -147,7 +145,6 @@ crossbeam-utils = { version = "0.8.19" }
147145
crossterm = { version = "0.27.0", features = ["event-stream", "serde"] }
148146
crypto-common = { version = "0.1.6", default-features = false, features = ["getrandom", "std"] }
149147
der = { version = "0.7.9", default-features = false, features = ["derive", "flagset", "oid", "pem", "std"] }
150-
diesel = { version = "2.1.6", features = ["chrono", "i-implement-a-third-party-backend-and-opt-into-breaking-changes", "network-address", "postgres", "r2d2", "serde_json", "uuid"] }
151148
digest = { version = "0.10.7", features = ["mac", "oid", "std"] }
152149
either = { version = "1.13.0" }
153150
elliptic-curve = { version = "0.13.8", features = ["ecdh", "hazmat", "pem", "std"] }
@@ -171,7 +168,6 @@ hmac = { version = "0.12.1", default-features = false, features = ["reset"] }
171168
hyper = { version = "0.14.30", features = ["full"] }
172169
indexmap = { version = "2.3.0", features = ["serde"] }
173170
inout = { version = "0.1.3", default-features = false, features = ["std"] }
174-
ipnetwork = { version = "0.20.0", features = ["schemars"] }
175171
itertools-5ef9efb8ec2df382 = { package = "itertools", version = "0.12.1" }
176172
itertools-93f6ce9d446188ac = { package = "itertools", version = "0.10.5" }
177173
lalrpop-util = { version = "0.19.12" }

0 commit comments

Comments
 (0)