Skip to content

Commit

Permalink
revert(abci): remove RefUniwndSafe trait from RequestDispatcher (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek authored Apr 3, 2023
1 parent 96878db commit 313c683
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions abci/src/application.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//! ABCI application interface.
use std::panic::RefUnwindSafe;

use tracing::debug;

Expand Down Expand Up @@ -139,7 +138,7 @@ pub trait Application {
}
}

pub trait RequestDispatcher: RefUnwindSafe {
pub trait RequestDispatcher {
/// Executes the relevant application method based on the type of the
/// request, and produces the corresponding response.
///
Expand All @@ -149,7 +148,7 @@ pub trait RequestDispatcher: RefUnwindSafe {
}

// Implement `RequestDispatcher` for all `Application`s.
impl<A: Application + RefUnwindSafe> RequestDispatcher for A {
impl<A: Application> RequestDispatcher for A {
fn handle(&self, request: abci::Request) -> Option<abci::Response> {
tracing::trace!(?request, "received request");

Expand Down
3 changes: 1 addition & 2 deletions abci/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ mod unix;
use std::{
io::{Read, Write},
net::{IpAddr, SocketAddr, SocketAddrV4, SocketAddrV6},
panic::RefUnwindSafe,
str::FromStr,
};

Expand All @@ -24,7 +23,7 @@ pub(crate) const DEFAULT_SERVER_READ_BUF_SIZE: usize = 1024 * 1024;
/// Use [`Server::handle_connection()`] to accept connection and process all
/// traffic in this connection. Each incoming connection will be processed using
/// `app`.
pub trait Server: RefUnwindSafe {
pub trait Server {
/// Process one incoming connection.
///
/// Returns when the connection is terminated or RequestDispatcher returns
Expand Down

0 comments on commit 313c683

Please sign in to comment.