File tree Expand file tree Collapse file tree 6 files changed +10
-19
lines changed
Expand file tree Collapse file tree 6 files changed +10
-19
lines changed Original file line number Diff line number Diff line change 1- use std:: { array , fmt} ;
1+ use std:: fmt;
22
33use http:: {
44 header:: { self , HeaderName , HeaderValue } ,
@@ -88,8 +88,7 @@ impl From<Any> for AllowHeaders {
8888
8989impl < const N : usize > From < [ HeaderName ; N ] > for AllowHeaders {
9090 fn from ( arr : [ HeaderName ; N ] ) -> Self {
91- #[ allow( deprecated) ] // Can be changed when MSRV >= 1.53
92- Self :: list ( array:: IntoIter :: new ( arr) )
91+ Self :: list ( arr)
9392 }
9493}
9594
Original file line number Diff line number Diff line change 1- use std:: { array , fmt} ;
1+ use std:: fmt;
22
33use http:: {
44 header:: { self , HeaderName , HeaderValue } ,
@@ -108,8 +108,7 @@ impl From<Method> for AllowMethods {
108108
109109impl < const N : usize > From < [ Method ; N ] > for AllowMethods {
110110 fn from ( arr : [ Method ; N ] ) -> Self {
111- #[ allow( deprecated) ] // Can be changed when MSRV >= 1.53
112- Self :: list ( array:: IntoIter :: new ( arr) )
111+ Self :: list ( arr)
113112 }
114113}
115114
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use http::{
44} ;
55use pin_project_lite:: pin_project;
66use std:: {
7- array , fmt,
7+ fmt,
88 future:: Future ,
99 pin:: Pin ,
1010 sync:: Arc ,
@@ -203,8 +203,7 @@ impl From<HeaderValue> for AllowOrigin {
203203
204204impl < const N : usize > From < [ HeaderValue ; N ] > for AllowOrigin {
205205 fn from ( arr : [ HeaderValue ; N ] ) -> Self {
206- #[ allow( deprecated) ] // Can be changed when MSRV >= 1.53
207- Self :: list ( array:: IntoIter :: new ( arr) )
206+ Self :: list ( arr)
208207 }
209208}
210209
Original file line number Diff line number Diff line change 1- use std:: { array , fmt} ;
1+ use std:: fmt;
22
33use http:: {
44 header:: { self , HeaderName , HeaderValue } ,
@@ -71,8 +71,7 @@ impl From<Any> for ExposeHeaders {
7171
7272impl < const N : usize > From < [ HeaderName ; N ] > for ExposeHeaders {
7373 fn from ( arr : [ HeaderName ; N ] ) -> Self {
74- #[ allow( deprecated) ] // Can be changed when MSRV >= 1.53
75- Self :: list ( array:: IntoIter :: new ( arr) )
74+ Self :: list ( arr)
7675 }
7776}
7877
Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ use http::{
5757} ;
5858use pin_project_lite:: pin_project;
5959use std:: {
60- array,
6160 future:: Future ,
6261 mem,
6362 pin:: Pin ,
@@ -813,8 +812,7 @@ fn ensure_usable_cors_rules(layer: &CorsLayer) {
813812///
814813/// This is the default set of header names returned in the `vary` header
815814pub fn preflight_request_headers ( ) -> impl Iterator < Item = HeaderName > {
816- #[ allow( deprecated) ] // Can be changed when MSRV >= 1.53
817- array:: IntoIter :: new ( [
815+ IntoIterator :: into_iter ( [
818816 header:: ORIGIN ,
819817 header:: ACCESS_CONTROL_REQUEST_METHOD ,
820818 header:: ACCESS_CONTROL_REQUEST_HEADERS ,
Original file line number Diff line number Diff line change 1- use std:: array;
2-
31use http:: header:: { self , HeaderName , HeaderValue } ;
42
53use super :: preflight_request_headers;
@@ -48,8 +46,7 @@ impl Default for Vary {
4846
4947impl < const N : usize > From < [ HeaderName ; N ] > for Vary {
5048 fn from ( arr : [ HeaderName ; N ] ) -> Self {
51- #[ allow( deprecated) ] // Can be changed when MSRV >= 1.53
52- Self :: list ( array:: IntoIter :: new ( arr) )
49+ Self :: list ( arr)
5350 }
5451}
5552
You can’t perform that action at this time.
0 commit comments