File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -159,18 +159,14 @@ mod tests {
159
159
const STATIC_HEADER : HeaderName = HeaderName :: from_lowercase_str ( "hello" ) ;
160
160
161
161
#[ test]
162
- fn test_header_name_static_non_static ( ) {
162
+ fn test_header_name_static_non_static ( ) -> crate :: Result < ( ) > {
163
163
let static_header = HeaderName :: from_lowercase_str ( "hello" ) ;
164
- let non_static_header = HeaderName :: from_str ( "hello" ) . unwrap ( ) ;
164
+ let non_static_header = HeaderName :: from_str ( "hello" ) ? ;
165
165
166
166
let mut headers = Headers :: new ( ) ;
167
- headers. append ( STATIC_HEADER , & [ "foo0" ] [ ..] ) . unwrap ( ) ;
168
- headers
169
- . append ( static_header. clone ( ) , & [ "foo1" ] [ ..] )
170
- . unwrap ( ) ;
171
- headers
172
- . append ( non_static_header. clone ( ) , & [ "foo2" ] [ ..] )
173
- . unwrap ( ) ;
167
+ headers. append ( STATIC_HEADER , "foo0" ) ?;
168
+ headers. append ( static_header. clone ( ) , "foo1" ) ?;
169
+ headers. append ( non_static_header. clone ( ) , "foo2" ) ?;
174
170
175
171
assert_eq ! (
176
172
& headers. get( & STATIC_HEADER ) . unwrap( ) [ ..] ,
@@ -186,5 +182,7 @@ mod tests {
186
182
& headers. get( & non_static_header) . unwrap( ) [ ..] ,
187
183
& [ "foo0" , "foo1" , "foo2" , ] [ ..]
188
184
) ;
185
+
186
+ Ok ( ( ) )
189
187
}
190
188
}
You can’t perform that action at this time.
0 commit comments