Skip to content

Commit

Permalink
server: Remove Sync trait bound for Service::call() future result
Browse files Browse the repository at this point in the history
  • Loading branch information
uklotzde committed Jan 4, 2024
1 parent e701b00 commit 195b31c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

# Changelog

## v0.10.1 (Unreleased)

- Server: Remove `Sync` trait bound for `Service::call()` future result.

## v0.10.0 (2024-01-03)

- Feature: Retrieve the `FunctionCode` of a `Request`/`Response`.
Expand Down
5 changes: 2 additions & 3 deletions src/server/service.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2017-2024 slowtec GmbH <[email protected]>
// 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 {
Expand All @@ -16,7 +15,7 @@ pub trait Service {
type Error;

/// The future response value.
type Future: Future<Output = Result<Self::Response, Self::Error>> + Send + Sync + Unpin;
type Future: Future<Output = Result<Self::Response, Self::Error>> + Send + Unpin;

/// Process the request and return the response asynchronously.
fn call(&self, req: Self::Request) -> Self::Future;
Expand Down

0 comments on commit 195b31c

Please sign in to comment.