fix clippy 1.84 warning

This commit is contained in:
Zhang Jingqiang 2024-11-08 10:35:34 +08:00
parent c074a74f48
commit b3be8a127c
9 changed files with 20 additions and 21 deletions

View file

@ -43,7 +43,7 @@ impl StreamDetourStream {
}
}
impl<'a, SC> StreamDetourContext<'a, SC>
impl<SC> StreamDetourContext<'_, SC>
where
SC: ServerConfig,
{

View file

@ -60,8 +60,7 @@ where
}
}
impl<'a, W> HttpRequestUpstreamWriter<HttpTransparentRequest>
for HttpRequestWriterForAdaptation<'a, W>
impl<W> HttpRequestUpstreamWriter<HttpTransparentRequest> for HttpRequestWriterForAdaptation<'_, W>
where
W: AsyncWrite + Send + Unpin,
{

View file

@ -77,7 +77,7 @@ where
}
}
impl<'a, W> FtpLineDataReceiver for ChunkedListWriter<'a, W>
impl<W> FtpLineDataReceiver for ChunkedListWriter<'_, W>
where
W: AsyncWrite + Send + Unpin,
{
@ -101,7 +101,7 @@ where
}
}
impl<'a, W> ListWriter for ChunkedListWriter<'a, W>
impl<W> ListWriter for ChunkedListWriter<'_, W>
where
W: AsyncWrite + Send + Unpin,
{
@ -152,7 +152,7 @@ where
}
}
impl<'a, W> FtpLineDataReceiver for EndingListWriter<'a, W>
impl<W> FtpLineDataReceiver for EndingListWriter<'_, W>
where
W: AsyncWrite + Send + Unpin,
{
@ -169,7 +169,7 @@ where
}
}
impl<'a, W> ListWriter for EndingListWriter<'a, W>
impl<W> ListWriter for EndingListWriter<'_, W>
where
W: AsyncWrite + Send + Unpin,
{

View file

@ -35,7 +35,7 @@ pub(super) struct BidirectionalRecvIcapResponse<'a, I: IdleCheck> {
pub(super) idle_checker: &'a I,
}
impl<'a, I: IdleCheck> BidirectionalRecvIcapResponse<'a, I> {
impl<I: IdleCheck> BidirectionalRecvIcapResponse<'_, I> {
pub(super) async fn transfer_and_recv<CR>(
self,
mut body_transfer: &mut H1BodyToChunkedTransfer<'_, CR, IcapClientWriter>,
@ -100,7 +100,7 @@ impl<'a, I: IdleCheck> BidirectionalRecvIcapResponse<'a, I> {
self.icap_client.config.icap_max_header_size,
&self.icap_client.config.respond_shared_names,
)
.await?;
.await?;
match rsp.code {
204 | 206 => Err(H1ReqmodAdaptationError::IcapServerErrorResponse(
@ -122,7 +122,7 @@ pub(super) struct BidirectionalRecvHttpRequest<'a, I: IdleCheck> {
pub(super) idle_checker: &'a I,
}
impl<'a, I: IdleCheck> BidirectionalRecvHttpRequest<'a, I> {
impl<I: IdleCheck> BidirectionalRecvHttpRequest<'_, I> {
pub(super) async fn transfer<H, CR, UW>(
self,
state: &mut ReqmodAdaptationRunState,
@ -141,7 +141,7 @@ impl<'a, I: IdleCheck> BidirectionalRecvHttpRequest<'a, I> {
http_header_size,
self.http_req_add_no_via_header,
)
.await?;
.await?;
http_req.set_chunked_encoding();
let final_req = orig_http_request.adapt_to(http_req);

View file

@ -40,7 +40,7 @@ pub(super) struct BidirectionalRecvIcapResponse<'a, I: IdleCheck> {
pub(super) idle_checker: &'a I,
}
impl<'a, I: IdleCheck> BidirectionalRecvIcapResponse<'a, I> {
impl<I: IdleCheck> BidirectionalRecvIcapResponse<'_, I> {
pub(super) async fn transfer_and_recv(
self,
mut body_transfer: &mut H2StreamToChunkedTransfer<'_, IcapClientWriter>,
@ -127,7 +127,7 @@ pub(super) struct BidirectionalRecvHttpRequest<'a, I: IdleCheck> {
pub(super) idle_checker: &'a I,
}
impl<'a, I: IdleCheck> BidirectionalRecvHttpRequest<'a, I> {
impl<I: IdleCheck> BidirectionalRecvHttpRequest<'_, I> {
pub(super) async fn transfer(
mut self,
state: &mut ReqmodAdaptationRunState,

View file

@ -36,7 +36,7 @@ pub(super) struct BidirectionalRecvIcapResponse<'a, I: IdleCheck> {
pub(super) idle_checker: &'a I,
}
impl<'a, I: IdleCheck> BidirectionalRecvIcapResponse<'a, I> {
impl<I: IdleCheck> BidirectionalRecvIcapResponse<'_, I> {
pub(super) async fn transfer_and_recv<CR>(
self,
mut msg_transfer: &mut LimitedCopy<'_, CR, IcapClientWriter>,
@ -126,7 +126,7 @@ pub(super) struct BidirectionalRecvHttpRequest<'a, I: IdleCheck> {
pub(super) idle_checker: &'a I,
}
impl<'a, I: IdleCheck> BidirectionalRecvHttpRequest<'a, I> {
impl<I: IdleCheck> BidirectionalRecvHttpRequest<'_, I> {
pub(super) async fn transfer<CR, UW>(
self,
state: &mut ReqmodAdaptationRunState,

View file

@ -35,7 +35,7 @@ pub(super) struct BidirectionalRecvIcapResponse<'a, I: IdleCheck> {
pub(super) idle_checker: &'a I,
}
impl<'a, I: IdleCheck> BidirectionalRecvIcapResponse<'a, I> {
impl<I: IdleCheck> BidirectionalRecvIcapResponse<'_, I> {
pub(super) async fn transfer_and_recv<CR>(
self,
mut msg_transfer: &mut StreamToChunkedTransfer<'_, CR, BufWriter<&'_ mut IcapClientWriter>>,
@ -118,7 +118,7 @@ pub(super) struct BidirectionalRecvHttpRequest<'a, I: IdleCheck> {
pub(super) idle_checker: &'a I,
}
impl<'a, I: IdleCheck> BidirectionalRecvHttpRequest<'a, I> {
impl<I: IdleCheck> BidirectionalRecvHttpRequest<'_, I> {
pub(super) async fn transfer<CR, UW>(
self,
state: &mut ReqmodAdaptationRunState,

View file

@ -35,7 +35,7 @@ pub(super) struct BidirectionalRecvIcapResponse<'a, I: IdleCheck> {
pub(super) idle_checker: &'a I,
}
impl<'a, I: IdleCheck> BidirectionalRecvIcapResponse<'a, I> {
impl<I: IdleCheck> BidirectionalRecvIcapResponse<'_, I> {
pub(super) async fn transfer_and_recv<UR>(
self,
mut body_transfer: &mut H1BodyToChunkedTransfer<'_, UR, IcapClientWriter>,
@ -120,7 +120,7 @@ pub(super) struct BidirectionalRecvHttpResponse<'a, I: IdleCheck> {
pub(super) idle_checker: &'a I,
}
impl<'a, I: IdleCheck> BidirectionalRecvHttpResponse<'a, I> {
impl<I: IdleCheck> BidirectionalRecvHttpResponse<'_, I> {
pub(super) async fn transfer<H, UR, CW>(
self,
state: &mut RespmodAdaptationRunState,

View file

@ -38,7 +38,7 @@ pub(super) struct BidirectionalRecvIcapResponse<'a, I: IdleCheck> {
pub(super) idle_checker: &'a I,
}
impl<'a, I: IdleCheck> BidirectionalRecvIcapResponse<'a, I> {
impl<I: IdleCheck> BidirectionalRecvIcapResponse<'_, I> {
pub(super) async fn transfer_and_recv(
self,
mut body_transfer: &mut H2StreamToChunkedTransfer<'_, IcapClientWriter>,
@ -122,7 +122,7 @@ pub(super) struct BidirectionalRecvHttpResponse<'a, I: IdleCheck> {
pub(super) idle_checker: &'a I,
}
impl<'a, I: IdleCheck> BidirectionalRecvHttpResponse<'a, I> {
impl<I: IdleCheck> BidirectionalRecvHttpResponse<'_, I> {
pub(super) async fn transfer<CW>(
mut self,
state: &mut RespmodAdaptationRunState,