fix: bad databaseargs default (#12747)

This commit is contained in:
Matthias Seitz
2024-11-21 19:46:39 +01:00
committed by GitHub
parent c2323b4e49
commit edeacbecfb

View File

@ -66,7 +66,7 @@ impl DatabaseEnvKind {
}
/// Arguments for database initialization.
#[derive(Clone, Debug, Default)]
#[derive(Clone, Debug)]
pub struct DatabaseArguments {
/// Client version that accesses the database.
client_version: ClientVersion,
@ -99,6 +99,12 @@ pub struct DatabaseArguments {
exclusive: Option<bool>,
}
impl Default for DatabaseArguments {
fn default() -> Self {
Self::new(ClientVersion::default())
}
}
impl DatabaseArguments {
/// Create new database arguments with given client version.
pub fn new(client_version: ClientVersion) -> Self {