From 13eb4a615a6cb29cfb3a2d0808d33d7d64b3248f Mon Sep 17 00:00:00 2001 From: teor Date: Wed, 6 Jan 2021 18:22:47 +1000 Subject: [PATCH] Revert unused instrument macros Reverts most of "Instrument some functions to try to locate the panic" --- zebra-network/src/peer/client.rs | 4 ---- zebra-network/src/peer/connection.rs | 2 -- zebra-network/src/peer/handshake.rs | 1 - 3 files changed, 7 deletions(-) diff --git a/zebra-network/src/peer/client.rs b/zebra-network/src/peer/client.rs index 33f67742fc4..26041bb24b4 100644 --- a/zebra-network/src/peer/client.rs +++ b/zebra-network/src/peer/client.rs @@ -134,7 +134,6 @@ impl MustUseOneshotSender { /// 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() @@ -150,7 +149,6 @@ impl MustUseOneshotSender { /// 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() @@ -163,7 +161,6 @@ impl MustUseOneshotSender { /// 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() @@ -208,7 +205,6 @@ impl Service for Client { } } - #[instrument(skip(self))] fn call(&mut self, request: Request) -> Self::Future { use futures::future::FutureExt; diff --git a/zebra-network/src/peer/connection.rs b/zebra-network/src/peer/connection.rs index 6b65160cdc3..36cdd06173c 100644 --- a/zebra-network/src/peer/connection.rs +++ b/zebra-network/src/peer/connection.rs @@ -345,7 +345,6 @@ where Tx: Sink + Unpin, { /// Consume this `Connection` to form a spawnable future containing its event loop. - #[instrument(skip(self, peer_rx))] pub async fn run(mut self, mut peer_rx: Rx) where Rx: Stream> + Unpin, @@ -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::*; diff --git a/zebra-network/src/peer/handshake.rs b/zebra-network/src/peer/handshake.rs index e022fb925cf..8158194fd0a 100644 --- a/zebra-network/src/peer/handshake.rs +++ b/zebra-network/src/peer/handshake.rs @@ -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;