de-global services
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
7e50db4193
commit
2f85a5c1ac
36 changed files with 327 additions and 336 deletions
|
@ -11,12 +11,12 @@ pub struct Database {
|
|||
|
||||
impl Database {
|
||||
/// Load an existing database or create a new one.
|
||||
pub async fn open(server: &Arc<Server>) -> Result<Self> {
|
||||
pub async fn open(server: &Arc<Server>) -> Result<Arc<Self>> {
|
||||
let db = Engine::open(server)?;
|
||||
Ok(Self {
|
||||
Ok(Arc::new(Self {
|
||||
db: db.clone(),
|
||||
map: maps::open(&db)?,
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue