Skip to content

Commit

Permalink
Delete redundant type parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
uklotzde committed Jul 19, 2024
1 parent 3b9041a commit 1afe9ba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
7 changes: 2 additions & 5 deletions src/server/rtu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,9 @@ impl Server {
}

/// frame wrapper around the underlying service's responses to forwarded requests
async fn process<S, Req>(
mut framed: Framed<SerialStream, ServerCodec>,
service: S,
) -> io::Result<()>
async fn process<S>(mut framed: Framed<SerialStream, ServerCodec>, service: S) -> io::Result<()>
where
S: Service<Request = Req> + Send + Sync + 'static,
S: Service + Send + Sync + 'static,
S::Request: From<RequestAdu<'static>> + Send,
{
loop {
Expand Down
4 changes: 2 additions & 2 deletions src/server/rtu_over_tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ impl Server {
}

/// The request-response loop spawned by [`serve_until`] for each client
async fn process<S, T, Req>(mut framed: Framed<T, ServerCodec>, service: S) -> io::Result<()>
async fn process<S, T>(mut framed: Framed<T, ServerCodec>, service: S) -> io::Result<()>
where
S: Service<Request = Req> + Send + Sync + 'static,
S: Service + Send + Sync + 'static,
S::Request: From<RequestAdu<'static>> + Send,
T: AsyncRead + AsyncWrite + Unpin,
{
Expand Down
4 changes: 2 additions & 2 deletions src/server/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ impl Server {
}

/// The request-response loop spawned by [`serve_until`] for each client
async fn process<S, T, Req>(mut framed: Framed<T, ServerCodec>, service: S) -> io::Result<()>
async fn process<S, T>(mut framed: Framed<T, ServerCodec>, service: S) -> io::Result<()>
where
S: Service<Request = Req> + Send + Sync + 'static,
S: Service + Send + Sync + 'static,
S::Request: From<RequestAdu<'static>> + Send,
T: AsyncRead + AsyncWrite + Unpin,
{
Expand Down

0 comments on commit 1afe9ba

Please sign in to comment.