build: bump redb to 3.0

This commit is contained in:
mokurin000
2025-08-10 21:59:47 +08:00
parent c8c101f72a
commit 0ce47537fb
3 changed files with 12 additions and 13 deletions

View File

@@ -1,12 +1,11 @@
use std::sync::LazyLock;
use redb::{ReadTransaction, Table, TableDefinition, WriteTransaction};
use redb::{ReadTransaction, ReadableDatabase as _, Table, TableDefinition, WriteTransaction};
static DATABASE: LazyLock<redb::Database> = LazyLock::new(|| {
let mut db = redb::Database::builder()
.create("players.redb")
.expect("failed to open database");
_ = db.upgrade();
_ = db.compact();
db
});