config: convert database backend to enum

This reports a nice error when the config is loaded, rather than later
when the database is initialized.
This commit is contained in:
Lambda 2024-06-16 14:31:59 +00:00 committed by Charles Hall
parent d26b87a2f2
commit 8a30817930
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
3 changed files with 40 additions and 11 deletions

View file

@ -1,3 +1,7 @@
// Avoid spurious warnings with --no-default-features, which isn't expected to
// work anyway
#![cfg_attr(not(any(feature = "sqlite", feature = "rocksdb")), allow(unused))]
use std::{
future::Future,
net::SocketAddr,