Remove external state for op handlers

This commit is contained in:
NGnius (Graham) committed 2025-04-06 11:00:37 -04:00
1 parent b99bbe67e4
commit 4d2ddaeafb
19 files changed
+150 -163

No files matched your search

+2 -3
View File
@@ -7,11 +7,10 @@ impl VersionTeller {
const LATEST_VERSION: i32 = 2855;
}
impl <C> Operation<C> for VersionTeller {
type State = ();
impl <C: Send + 'static> Operation<C> for VersionTeller {
type User = crate::UserTy;
fn handle(&self, _: polariton::operation::ParameterTable<C>, _: &mut Self::State, _: &Self::User) -> polariton::operation::OperationResponse<C> {
fn handle(&self, _: polariton::operation::ParameterTable<C>, _: &Self::User) -> polariton::operation::OperationResponse<C> {
let mut resp_params = std::collections::HashMap::new();
resp_params.insert(Self::VERSION_NUMBER_KEY, polariton::operation::Typed::Int(Self::LATEST_VERSION));
polariton::operation::OperationResponse {