Skip to content

Commit a1d8c9f

Browse files
authored
Fix clippy lifetime warning for headers() (#653)
1 parent 946a461 commit a1d8c9f

6 files changed

Lines changed: 17 additions & 17 deletions

File tree

autorust/codegen/src/codegen_operations/response_code.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ impl ToTokens for ResponseCode {
134134
};
135135

136136
let headers_fn = if self.headers.has_headers() {
137-
quote! { pub fn headers(&self) -> Headers { Headers(self.0.headers()) } }
137+
quote! { pub fn headers(&self) -> Headers<'_> { Headers(self.0.headers()) } }
138138
} else {
139139
quote! {}
140140
};

azure_devops_rust_api/src/dashboard/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,7 +1389,7 @@ pub mod widgets {
13891389
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
13901390
self.0.into()
13911391
}
1392-
pub fn headers(&self) -> Headers {
1392+
pub fn headers(&self) -> Headers<'_> {
13931393
Headers(self.0.headers())
13941394
}
13951395
}
@@ -1618,7 +1618,7 @@ pub mod widgets {
16181618
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
16191619
self.0.into()
16201620
}
1621-
pub fn headers(&self) -> Headers {
1621+
pub fn headers(&self) -> Headers<'_> {
16221622
Headers(self.0.headers())
16231623
}
16241624
}
@@ -1743,7 +1743,7 @@ pub mod widgets {
17431743
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
17441744
self.0.into()
17451745
}
1746-
pub fn headers(&self) -> Headers {
1746+
pub fn headers(&self) -> Headers<'_> {
17471747
Headers(self.0.headers())
17481748
}
17491749
}

azure_devops_rust_api/src/git/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4275,7 +4275,7 @@ pub mod policy_configurations {
42754275
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
42764276
self.0.into()
42774277
}
4278-
pub fn headers(&self) -> Headers {
4278+
pub fn headers(&self) -> Headers<'_> {
42794279
Headers(self.0.headers())
42804280
}
42814281
}

azure_devops_rust_api/src/graph/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ pub mod groups {
400400
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
401401
self.0.into()
402402
}
403-
pub fn headers(&self) -> Headers {
403+
pub fn headers(&self) -> Headers<'_> {
404404
Headers(self.0.headers())
405405
}
406406
}
@@ -1916,7 +1916,7 @@ pub mod service_principals {
19161916
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
19171917
self.0.into()
19181918
}
1919-
pub fn headers(&self) -> Headers {
1919+
pub fn headers(&self) -> Headers<'_> {
19201920
Headers(self.0.headers())
19211921
}
19221922
}
@@ -3195,7 +3195,7 @@ pub mod users {
31953195
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
31963196
self.0.into()
31973197
}
3198-
pub fn headers(&self) -> Headers {
3198+
pub fn headers(&self) -> Headers<'_> {
31993199
Headers(self.0.headers())
32003200
}
32013201
}

azure_devops_rust_api/src/search/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ pub mod package_search_results {
195195
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
196196
self.0.into()
197197
}
198-
pub fn headers(&self) -> Headers {
198+
pub fn headers(&self) -> Headers<'_> {
199199
Headers(self.0.headers())
200200
}
201201
}

azure_devops_rust_api/src/wiki/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ pub mod attachments {
817817
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
818818
self.0.into()
819819
}
820-
pub fn headers(&self) -> Headers {
820+
pub fn headers(&self) -> Headers<'_> {
821821
Headers(self.0.headers())
822822
}
823823
}
@@ -1020,7 +1020,7 @@ pub mod page_moves {
10201020
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
10211021
self.0.into()
10221022
}
1023-
pub fn headers(&self) -> Headers {
1023+
pub fn headers(&self) -> Headers<'_> {
10241024
Headers(self.0.headers())
10251025
}
10261026
}
@@ -1364,7 +1364,7 @@ pub mod pages {
13641364
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
13651365
self.0.into()
13661366
}
1367-
pub fn headers(&self) -> Headers {
1367+
pub fn headers(&self) -> Headers<'_> {
13681368
Headers(self.0.headers())
13691369
}
13701370
}
@@ -1557,7 +1557,7 @@ pub mod pages {
15571557
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
15581558
self.0.into()
15591559
}
1560-
pub fn headers(&self) -> Headers {
1560+
pub fn headers(&self) -> Headers<'_> {
15611561
Headers(self.0.headers())
15621562
}
15631563
}
@@ -1737,7 +1737,7 @@ pub mod pages {
17371737
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
17381738
self.0.into()
17391739
}
1740-
pub fn headers(&self) -> Headers {
1740+
pub fn headers(&self) -> Headers<'_> {
17411741
Headers(self.0.headers())
17421742
}
17431743
}
@@ -1913,7 +1913,7 @@ pub mod pages {
19131913
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
19141914
self.0.into()
19151915
}
1916-
pub fn headers(&self) -> Headers {
1916+
pub fn headers(&self) -> Headers<'_> {
19171917
Headers(self.0.headers())
19181918
}
19191919
}
@@ -2049,7 +2049,7 @@ pub mod pages {
20492049
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
20502050
self.0.into()
20512051
}
2052-
pub fn headers(&self) -> Headers {
2052+
pub fn headers(&self) -> Headers<'_> {
20532053
Headers(self.0.headers())
20542054
}
20552055
}
@@ -2178,7 +2178,7 @@ pub mod pages {
21782178
pub fn into_raw_response(self) -> azure_core::http::RawResponse {
21792179
self.0.into()
21802180
}
2181-
pub fn headers(&self) -> Headers {
2181+
pub fn headers(&self) -> Headers<'_> {
21822182
Headers(self.0.headers())
21832183
}
21842184
}

0 commit comments

Comments
 (0)