File tree 3 files changed +3
-11
lines changed
3 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,7 @@ pub struct Request<T> {
165
165
/// The HTTP request head consists of a method, uri, version, and a set of
166
166
/// header fields.
167
167
#[ derive( Clone ) ]
168
+ #[ non_exhaustive]
168
169
pub struct Parts {
169
170
/// The request's method
170
171
pub method : Method ,
@@ -180,8 +181,6 @@ pub struct Parts {
180
181
181
182
/// The request's extensions
182
183
pub extensions : Extensions ,
183
-
184
- _priv : ( ) ,
185
184
}
186
185
187
186
/// An HTTP request builder
@@ -715,7 +714,6 @@ impl Parts {
715
714
version : Version :: default ( ) ,
716
715
headers : HeaderMap :: default ( ) ,
717
716
extensions : Extensions :: default ( ) ,
718
- _priv : ( ) ,
719
717
}
720
718
}
721
719
}
Original file line number Diff line number Diff line change @@ -187,6 +187,7 @@ pub struct Response<T> {
187
187
/// The HTTP response head consists of a status, version, and a set of
188
188
/// header fields.
189
189
#[ derive( Clone ) ]
190
+ #[ non_exhaustive]
190
191
pub struct Parts {
191
192
/// The response's status
192
193
pub status : StatusCode ,
@@ -199,8 +200,6 @@ pub struct Parts {
199
200
200
201
/// The response's extensions
201
202
pub extensions : Extensions ,
202
-
203
- _priv : ( ) ,
204
203
}
205
204
206
205
/// An HTTP response builder
@@ -507,7 +506,6 @@ impl Parts {
507
506
version : Version :: default ( ) ,
508
507
headers : HeaderMap :: default ( ) ,
509
508
extensions : Extensions :: default ( ) ,
510
- _priv : ( ) ,
511
509
}
512
510
}
513
511
}
@@ -519,7 +517,6 @@ impl fmt::Debug for Parts {
519
517
. field ( "version" , & self . version )
520
518
. field ( "headers" , & self . headers )
521
519
// omits Extensions because not useful
522
- // omits _priv because not useful
523
520
. finish ( )
524
521
}
525
522
}
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ pub struct Uri {
103
103
///
104
104
/// This struct is used to provide to and retrieve from a URI.
105
105
#[ derive( Debug , Default ) ]
106
+ #[ non_exhaustive]
106
107
pub struct Parts {
107
108
/// The scheme component of a URI
108
109
pub scheme : Option < Scheme > ,
@@ -112,9 +113,6 @@ pub struct Parts {
112
113
113
114
/// The origin-form component of a URI
114
115
pub path_and_query : Option < PathAndQuery > ,
115
-
116
- /// Allow extending in the future
117
- _priv : ( ) ,
118
116
}
119
117
120
118
/// An error resulting from a failed attempt to construct a URI.
@@ -814,7 +812,6 @@ impl From<Uri> for Parts {
814
812
scheme,
815
813
authority,
816
814
path_and_query,
817
- _priv : ( ) ,
818
815
}
819
816
}
820
817
}
You can’t perform that action at this time.
0 commit comments