1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Remove external state for op handlers

This commit is contained in:
NGnius (Graham)
2025-04-06 11:00:37 -04:00
parent b99bbe67e4
commit 4d2ddaeafb
19 changed files with 150 additions and 163 deletions

View File

@@ -5,11 +5,10 @@ use polariton_server::operations::{Operation, OperationCode};
pub struct QualityConfigTeller;
impl <C> Operation<C> for QualityConfigTeller {
type State = ();
impl <C: Send + 'static> Operation<C> for QualityConfigTeller {
type User = crate::UserTy;
fn handle(&self, _: ParameterTable<C>, _: &mut Self::State, _: &Self::User) -> OperationResponse<C> {
fn handle(&self, _: ParameterTable<C>, _: &Self::User) -> OperationResponse<C> {
let quality_levels = Typed::HashMap(vec![
(Typed::Str("extremLow".into()), Typed::Dict(Dict {
key_ty: TypePrefix::Str,