From a7d9fc142c5e906953deaf8c61b298fe29ba83cc Mon Sep 17 00:00:00 2001 From: sphericle Date: Mon, 30 Mar 2026 16:29:11 +0200 Subject: [PATCH] fix: use `TestRequest` lifetimes consistently MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this was annoyingly giving me a warning for a while 😅 --- pointercrate-test/src/demonlist.rs | 2 +- pointercrate-test/src/lib.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pointercrate-test/src/demonlist.rs b/pointercrate-test/src/demonlist.rs index e4b6c2a0a..e9220fc97 100644 --- a/pointercrate-test/src/demonlist.rs +++ b/pointercrate-test/src/demonlist.rs @@ -102,7 +102,7 @@ pub async fn add_simple_record(progress: i16, player: i32, demon: i32, status: R impl TestClient { pub async fn patch_player( &self, player_id: i32, auth_context: &AuthenticatedUser, patch: serde_json::Value, - ) -> TestRequest { + ) -> TestRequest<'_> { let player: FullPlayer = self .get(format!("/api/v1/players/{}/", player_id)) .expect_status(Status::Ok) diff --git a/pointercrate-test/src/lib.rs b/pointercrate-test/src/lib.rs index b67a10dc4..e170a5702 100644 --- a/pointercrate-test/src/lib.rs +++ b/pointercrate-test/src/lib.rs @@ -20,23 +20,23 @@ impl TestClient { TestClient(client) } - pub fn get(&self, url: impl Into) -> TestRequest { + pub fn get(&self, url: impl Into) -> TestRequest<'_> { TestRequest::new(self.0.get(url.into())) } - pub fn put(&self, url: impl Into) -> TestRequest { + pub fn put(&self, url: impl Into) -> TestRequest<'_> { TestRequest::new(self.0.put(url.into())) } - pub fn post(&self, url: impl Into, body: &impl Serialize) -> TestRequest { + pub fn post(&self, url: impl Into, body: &impl Serialize) -> TestRequest<'_> { TestRequest::new(self.0.post(url.into()).json(body)) } - pub fn patch(&self, url: impl Into, body: &impl Serialize) -> TestRequest { + pub fn patch(&self, url: impl Into, body: &impl Serialize) -> TestRequest<'_> { TestRequest::new(self.0.patch(url.into()).json(body)) } - pub fn delete(&self, url: impl Into) -> TestRequest { + pub fn delete(&self, url: impl Into) -> TestRequest<'_> { TestRequest::new(self.0.delete(url.into())) } }