File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ impl conduit::Headers for Parts {
21
21
/// If the value of a header is not valid UTF-8, that value
22
22
/// is replaced with the emtpy string.
23
23
fn find ( & self , key : & str ) -> Option < Vec < & str > > {
24
- let values = self . headers ( )
24
+ let values = self
25
+ . headers ( )
25
26
. get_all ( key)
26
27
. iter ( )
27
28
. map ( |v| v. to_str ( ) . unwrap_or ( "" ) )
@@ -46,7 +47,8 @@ impl conduit::Headers for Parts {
46
47
let mut all = Vec :: new ( ) ;
47
48
for key in self . headers ( ) . keys ( ) {
48
49
let key = key. as_str ( ) ;
49
- let values = self . find ( key)
50
+ let values = self
51
+ . find ( key)
50
52
. expect ( "all keys should have at least one value" ) ;
51
53
all. push ( ( key, values) ) ;
52
54
}
@@ -135,7 +137,8 @@ impl conduit::Request for ConduitRequest {
135
137
///
136
138
/// If the header is not present or invalid UTF-8, then the empty string is returned
137
139
fn host ( & self ) -> conduit:: Host < ' _ > {
138
- let host = self . parts
140
+ let host = self
141
+ . parts
139
142
. headers ( )
140
143
. get ( "host" )
141
144
. map ( |h| h. to_str ( ) . unwrap_or ( "" ) )
You can’t perform that action at this time.
0 commit comments