Brought Example up to spec
Some checks failed
CI / checks (push) Failing after 3m29s

This commit is contained in:
Alex Emmet 2026-07-19 00:29:24 +02:00
commit 1b796d0ce7
46 changed files with 1755 additions and 691 deletions

View file

@ -1,14 +1,14 @@
use std::collections::HashMap;
use std::fs;
use std::sync::{Arc, Mutex};
use tokio::fs;
use mtp::crypto::PublicKeyBundle;
pub fn load_client_db(
pub async fn load_client_db(
path: &str,
) -> Result<(Arc<Mutex<HashMap<u64, PublicKeyBundle>>>, Arc<Mutex<u64>>), Box<dyn std::error::Error>>
{
let clients_map = match fs::read_to_string(path) {
let clients_map = match fs::read_to_string(path).await {
Ok(data) => match serde_json::from_str(&data) {
Ok(clients) => clients,
Err(e) => {