Skip to content

Commit 8987188

Browse files
finally
1 parent 393402c commit 8987188

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

crates/pgt_workspace/src/settings.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,10 @@ impl From<PartialDatabaseConfiguration> for DatabaseSettings {
299299

300300
// "host" is the minimum required setting for database features
301301
// to be enabled.
302-
let enable_connection = value.host.as_ref().is_some_and(|_| {
303-
!value.disable_connection.expect(
304-
"Developer Error: --disable-db should never be `None` since it's of type `bpaf(switch)`.",
305-
)
306-
});
302+
let enable_connection = value
303+
.host
304+
.as_ref()
305+
.is_some_and(|_| value.disable_connection.is_none_or(|disabled| !disabled));
307306

308307
let database = value.database.unwrap_or(d.database);
309308
let host = value.host.unwrap_or(d.host);

0 commit comments

Comments
 (0)