From d7820027cfb45f38b3fa6f3cd3b3ad2aff4c36c6 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Thu, 4 Jan 2024 12:39:00 +0100 Subject: [PATCH] server: Remove `Sync` trait bound for `Service::call()` future result --- CHANGELOG.md | 6 ++++++ src/server/service.rs | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c71f93a5..f6ca7511 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ # Changelog +## v0.11.0 (Unreleased) + +### Breaking Changes + +- Server: Remove `Sync` trait bound for `Service::call()` future result. + ## v0.10.0 (2024-01-03) - Feature: Retrieve the `FunctionCode` of a `Request`/`Response`. diff --git a/src/server/service.rs b/src/server/service.rs index d7eb31c3..ad1609c4 100644 --- a/src/server/service.rs +++ b/src/server/service.rs @@ -1,8 +1,7 @@ // SPDX-FileCopyrightText: Copyright (c) 2017-2024 slowtec GmbH // SPDX-License-Identifier: MIT OR Apache-2.0 -use std::future::Future; -use std::ops::Deref; +use std::{future::Future, ops::Deref}; /// A Modbus server service. pub trait Service { @@ -16,7 +15,7 @@ pub trait Service { type Error; /// The future response value. - type Future: Future> + Send + Sync + Unpin; + type Future: Future> + Send + Unpin; /// Process the request and return the response asynchronously. fn call(&self, req: Self::Request) -> Self::Future;