127 errors left
This commit is contained in:
parent
cff52d7ebb
commit
44fe6d1554
65 changed files with 809 additions and 556 deletions
|
@ -1,4 +1,4 @@
|
|||
use std::{collections::BTreeMap, sync::Arc};
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use futures_util::{stream::FuturesUnordered, StreamExt};
|
||||
|
@ -9,7 +9,7 @@ use crate::{Result, service, database::KeyValueDatabase, Error, utils, services}
|
|||
pub const COUNTER: &[u8] = b"c";
|
||||
|
||||
#[async_trait]
|
||||
impl service::globals::Data for Arc<KeyValueDatabase> {
|
||||
impl service::globals::Data for KeyValueDatabase {
|
||||
fn next_count(&self) -> Result<u64> {
|
||||
utils::u64_from_bytes(&self.global.increment(COUNTER)?)
|
||||
.map_err(|_| Error::bad_database("Count has invalid bytes."))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue