Skip to content

Commit

Permalink
Remove redundant track_callers which now cause errors on nightly (#5839)
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 authored Dec 13, 2022
1 parent b722a34 commit 019ae25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
8 changes: 0 additions & 8 deletions zebra-test/src/mock_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ impl<Request, Response, Error> MockService<Request, Response, PanicAssertion, Er
/// assert!(matches!(call.await, Ok(Ok("response"))));
/// # });
/// ```
#[track_caller]
pub async fn expect_request(
&mut self,
expected: Request,
Expand Down Expand Up @@ -372,7 +371,6 @@ impl<Request, Response, Error> MockService<Request, Response, PanicAssertion, Er
/// assert!(matches!(call.await, Ok(Ok("response"))));
/// # });
/// ```
#[track_caller]
pub async fn expect_request_that(
&mut self,
condition: impl FnOnce(&Request) -> bool,
Expand Down Expand Up @@ -420,7 +418,6 @@ impl<Request, Response, Error> MockService<Request, Response, PanicAssertion, Er
/// mock_service.expect_no_requests().await;
/// # });
/// ```
#[track_caller]
pub async fn expect_no_requests(&mut self)
where
Request: Debug,
Expand All @@ -446,7 +443,6 @@ impl<Request, Response, Error> MockService<Request, Response, PanicAssertion, Er
///
/// If the queue is empty and a request is not received before the max request delay timeout
/// expires.
#[track_caller]
async fn next_request(&mut self) -> ResponseSender<Request, Response, Error> {
match self.try_next_request().await {
Some(request) => request,
Expand Down Expand Up @@ -507,7 +503,6 @@ impl<Request, Response, Error> MockService<Request, Response, PropTestAssertion,
/// # test_code().await
/// # }).unwrap();
/// ```
#[track_caller]
pub async fn expect_request(
&mut self,
expected: Request,
Expand Down Expand Up @@ -574,7 +569,6 @@ impl<Request, Response, Error> MockService<Request, Response, PropTestAssertion,
/// # test_code().await
/// # }).unwrap();
/// ```
#[track_caller]
pub async fn expect_request_that(
&mut self,
condition: impl FnOnce(&Request) -> bool,
Expand Down Expand Up @@ -629,7 +623,6 @@ impl<Request, Response, Error> MockService<Request, Response, PropTestAssertion,
/// # test_code().await
/// # }).unwrap();
/// ```
#[track_caller]
pub async fn expect_no_requests(&mut self) -> Result<(), TestCaseError>
where
Request: Debug,
Expand Down Expand Up @@ -657,7 +650,6 @@ impl<Request, Response, Error> MockService<Request, Response, PropTestAssertion,
///
/// If the queue is empty and a request is not received before the max request delay timeout
/// expires, an error generated by a [`mod@proptest`] assertion is returned.
#[track_caller]
async fn next_request(
&mut self,
) -> Result<ResponseSender<Request, Response, Error>, TestCaseError> {
Expand Down
12 changes: 6 additions & 6 deletions zebra-test/src/transcript.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
//! A [`Service`](tower::Service) implementation based on a fixed transcript.
use std::{
fmt::Debug,
sync::Arc,
task::{Context, Poll},
};

use color_eyre::{
eyre::{eyre, Report, WrapErr},
section::Section,
section::SectionExt,
};
use futures::future::{ready, Ready};
use std::{
fmt::Debug,
sync::Arc,
task::{Context, Poll},
};
use tower::{Service, ServiceExt};

type BoxError = Box<dyn std::error::Error + Send + Sync + 'static>;
Expand Down Expand Up @@ -90,7 +91,6 @@ where
S: Debug + Eq,
{
/// Check this transcript against the responses from the `to_check` service
#[track_caller]
pub async fn check<C>(mut self, mut to_check: C) -> Result<(), Report>
where
C: Service<R, Response = S>,
Expand Down

0 comments on commit 019ae25

Please sign in to comment.