Skip to content

Commit

Permalink
Revert unused instrument macros
Browse files Browse the repository at this point in the history
Reverts most of "Instrument some functions to try to locate the panic"
  • Loading branch information
teor2345 committed Jan 6, 2021
1 parent 998e264 commit 13eb4a6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
4 changes: 0 additions & 4 deletions zebra-network/src/peer/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ impl<T: std::fmt::Debug> MustUseOneshotSender<T> {
/// Forwards `t` to `tx.send()`, and marks this sender as used.
///
/// Panics if `tx.send()` is used more than once.
#[instrument(skip(self))]
pub fn send(mut self, t: T) -> Result<(), T> {
self.tx
.take()
Expand All @@ -150,7 +149,6 @@ impl<T: std::fmt::Debug> MustUseOneshotSender<T> {
/// Returns `tx.cancellation()`.
///
/// Panics if `tx.send()` has previously been used.
#[instrument(skip(self))]
pub fn cancellation(&mut self) -> oneshot::Cancellation<'_, T> {
self.tx
.as_mut()
Expand All @@ -163,7 +161,6 @@ impl<T: std::fmt::Debug> MustUseOneshotSender<T> {
/// Returns `tx.is_canceled()`.
///
/// Panics if `tx.send()` has previously been used.
#[instrument(skip(self))]
pub fn is_canceled(&self) -> bool {
self.tx
.as_ref()
Expand Down Expand Up @@ -208,7 +205,6 @@ impl Service<Request> for Client {
}
}

#[instrument(skip(self))]
fn call(&mut self, request: Request) -> Self::Future {
use futures::future::FutureExt;

Expand Down
2 changes: 0 additions & 2 deletions zebra-network/src/peer/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ where
Tx: Sink<Message, Error = SerializationError> + Unpin,
{
/// Consume this `Connection` to form a spawnable future containing its event loop.
#[instrument(skip(self, peer_rx))]
pub async fn run<Rx>(mut self, mut peer_rx: Rx)
where
Rx: Stream<Item = Result<Message, SerializationError>> + Unpin,
Expand Down Expand Up @@ -538,7 +537,6 @@ where
/// remote peer.
///
/// NOTE: the caller should use .instrument(msg.span) to instrument the function.
#[instrument(skip(self))]
async fn handle_client_request(&mut self, req: InProgressClientRequest) {
trace!(?req.request);
use Request::*;
Expand Down
1 change: 0 additions & 1 deletion zebra-network/src/peer/handshake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ where
Poll::Ready(Ok(()))
}

#[instrument(skip(self))]
fn call(&mut self, req: (TcpStream, SocketAddr)) -> Self::Future {
let (tcp_stream, addr) = req;

Expand Down

0 comments on commit 13eb4a6

Please sign in to comment.