Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ with-fuzzer-no-link = ["lmdb", "lmdb-rkv/with-fuzzer-no-link"]
[dependencies]
arrayref = "0.3"
bincode = "1.0"
bitflags = "1.2"
bitflags = {version = "2.4.1", features = ["serde"]}
byteorder = "1"
id-arena = "2.2"
lazy_static = "1.1"
Expand Down
4 changes: 2 additions & 2 deletions src/backend/impl_lmdb/arch_migrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const MAGIC: [u8; 4] = [0xDE, 0xC0, 0xEF, 0xBE];
pub type MigrateResult<T> = Result<T, MigrateError>;

bitflags! {
#[derive(Default)]
#[derive(Default, PartialEq, Eq, Debug, Clone, Copy)]
struct PageFlags: u16 {
const BRANCH = 0x01;
const LEAF = 0x02;
Expand All @@ -98,7 +98,7 @@ bitflags! {
}

bitflags! {
#[derive(Default)]
#[derive(Default, PartialEq, Eq, Debug, Clone, Copy)]
struct NodeFlags: u16 {
const BIGDATA = 0x01;
const SUBDATA = 0x02;
Expand Down
3 changes: 2 additions & 1 deletion src/backend/impl_safe/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ impl<'e> BackendEnvironment<'e> for EnvironmentImpl {
// TOOD: don't reallocate `name`.
let key = name.map(String::from);
let mut dbs = self.dbs.write().map_err(|_| ErrorImpl::EnvPoisonError)?;
if dbs.name_map.keys().filter_map(|k| k.as_ref()).count() >= self.max_dbs && name.is_some() {
if dbs.name_map.keys().filter_map(|k| k.as_ref()).count() >= self.max_dbs && name.is_some()
{
return Err(ErrorImpl::DbsFull);
}
let parts = EnvironmentDbsRefMut::from(dbs.deref_mut());
Expand Down
6 changes: 3 additions & 3 deletions src/backend/impl_safe/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::backend::{
};

bitflags! {
#[derive(Default, Serialize, Deserialize)]
#[derive(Default, Serialize, Deserialize, PartialEq, Eq, Debug, Clone, Copy)]
pub struct EnvironmentFlagsImpl: u32 {
const NIL = 0b0000_0000;
}
Expand Down Expand Up @@ -54,7 +54,7 @@ impl Into<EnvironmentFlagsImpl> for EnvironmentFlags {
}

bitflags! {
#[derive(Default, Serialize, Deserialize)]
#[derive(Default, Serialize, Deserialize, PartialEq, Eq, Debug, Clone, Copy)]
pub struct DatabaseFlagsImpl: u32 {
const NIL = 0b0000_0000;
#[cfg(feature = "db-dup-sort")]
Expand Down Expand Up @@ -93,7 +93,7 @@ impl Into<DatabaseFlagsImpl> for DatabaseFlags {
}

bitflags! {
#[derive(Default, Serialize, Deserialize)]
#[derive(Default, Serialize, Deserialize, PartialEq, Eq, Debug, Clone, Copy)]
pub struct WriteFlagsImpl: u32 {
const NIL = 0b0000_0000;
}
Expand Down