async sockets

This commit is contained in:
Alex Emmet 2025-11-09 19:25:01 +00:00
commit 4170b9f387
23 changed files with 544 additions and 479 deletions

View file

@ -98,11 +98,11 @@ impl Interactable for Category {
let mut v = JsonValue::new_object();
v["children"] = JsonValue::new_array();
for child in &self.children {
v["children"].push(child.to_json());
let _ = v["children"].push(child.to_json());
}
v
}
fn load(&mut self, community: Arc<Community>, path: String, name: String, json: &JsonValue) {
fn load(&mut self, community: Arc<Community>, path: String, name: String, _json: &JsonValue) {
self.community = community;
self.name = name;
self.path = path;

View file

@ -11,13 +11,9 @@ use aes_gcm::aead::Payload;
use async_trait::async_trait;
use axum::Json;
use json::{JsonValue, array, object};
use rustls::ClientConnection;
use std::sync::Arc;
use std::{any::Any, collections::HashMap};
use std::{
fs::{self, File},
pin::Pin,
};
use std::{fs, pin::Pin};
use uuid::Uuid;
pub struct TextChat {
name: String,
@ -246,10 +242,9 @@ impl Interactable for TextChat {
CommunicationValue::new(CommunicationType::error).with_id(cv.get_id())
}
fn to_json(&self) -> JsonValue {
let mut v = JsonValue::new_object();
v
JsonValue::new_object()
}
fn load(&mut self, community: Arc<Community>, path: String, name: String, json: &JsonValue) {
fn load(&mut self, community: Arc<Community>, path: String, name: String, _: &JsonValue) {
self.community = community;
self.name = name;
self.path = path;

View file

@ -188,7 +188,7 @@ impl Interactable for VoiceChat {
let v = JsonValue::new_object();
v
}
fn load(&mut self, community: Arc<Community>, path: String, name: String, _: &JsonValue) {
fn load(&mut self, community: Arc<Community>, path: String, name: String, _json: &JsonValue) {
self.community = community;
self.name = name;
self.path = path;