Skip to content

Commit 8fa048f

Browse files
authored
fix: use TestRequest lifetimes consistently (#343)
this was annoyingly giving me a warning for a while 😅 Co-authored-by: sphericle <sphericle@users.noreply.github.com>
1 parent fc28a73 commit 8fa048f

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

pointercrate-test/src/demonlist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ pub async fn add_simple_record(progress: i16, player: i32, demon: i32, status: R
102102
impl TestClient {
103103
pub async fn patch_player(
104104
&self, player_id: i32, auth_context: &AuthenticatedUser<PasswordOrBrowser>, patch: serde_json::Value,
105-
) -> TestRequest {
105+
) -> TestRequest<'_> {
106106
let player: FullPlayer = self
107107
.get(format!("/api/v1/players/{}/", player_id))
108108
.expect_status(Status::Ok)

pointercrate-test/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@ impl TestClient {
2020
TestClient(client)
2121
}
2222

23-
pub fn get(&self, url: impl Into<String>) -> TestRequest {
23+
pub fn get(&self, url: impl Into<String>) -> TestRequest<'_> {
2424
TestRequest::new(self.0.get(url.into()))
2525
}
2626

27-
pub fn put(&self, url: impl Into<String>) -> TestRequest {
27+
pub fn put(&self, url: impl Into<String>) -> TestRequest<'_> {
2828
TestRequest::new(self.0.put(url.into()))
2929
}
3030

31-
pub fn post(&self, url: impl Into<String>, body: &impl Serialize) -> TestRequest {
31+
pub fn post(&self, url: impl Into<String>, body: &impl Serialize) -> TestRequest<'_> {
3232
TestRequest::new(self.0.post(url.into()).json(body))
3333
}
3434

35-
pub fn patch(&self, url: impl Into<String>, body: &impl Serialize) -> TestRequest {
35+
pub fn patch(&self, url: impl Into<String>, body: &impl Serialize) -> TestRequest<'_> {
3636
TestRequest::new(self.0.patch(url.into()).json(body))
3737
}
3838

39-
pub fn delete(&self, url: impl Into<String>) -> TestRequest {
39+
pub fn delete(&self, url: impl Into<String>) -> TestRequest<'_> {
4040
TestRequest::new(self.0.delete(url.into()))
4141
}
4242
}

0 commit comments

Comments
 (0)