From 5ad76c5971d925aa719445a3ba1774b0a0cb1ab9 Mon Sep 17 00:00:00 2001 From: hzargar2 Date: Sat, 19 Aug 2023 17:37:01 -0400 Subject: [PATCH] feat: fixed mutability --- src/params.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/params.rs b/src/params.rs index bfd1ea2d1..8b4ce87ad 100644 --- a/src/params.rs +++ b/src/params.rs @@ -394,7 +394,7 @@ where /// Requires `feature = ["async", "stream"]`. #[cfg(all(feature = "async", feature = "stream"))] pub fn stream( - mut self, + self, client: &Client, ) -> impl futures_util::Stream> + Unpin { // We are going to be popping items off the end of the list, so we need to reverse it. @@ -408,7 +408,7 @@ where async fn unfold_stream( state: Option<(Self, Client)>, ) -> Option<(Result, Option<(Self, Client)>)> { - let (mut paginator, client) = state?; // If none, we sent the last item in the last iteration + let (paginator, client) = state?; // If none, we sent the last item in the last iteration if paginator.page.get_data().len() > 1 { return Some((Ok(paginator.page.get_data().pop()?), Some((paginator, client)))); @@ -420,7 +420,7 @@ where } match paginator.next(&client).await { - Ok(mut next_paginator) => { + Ok(next_paginator) => { let data = paginator.page.get_data().pop()?; next_paginator.page.get_data().reverse();