Remove redundant track_callers which now cause errors on nightly (#5839)
This commit is contained in:
parent
b722a34102
commit
019ae25847
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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> {
|
||||
|
|
|
@ -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>;
|
||||
|
@ -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>,
|
||||
|
|
Loading…
Reference in New Issue