File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -166,13 +166,15 @@ struct FullPath<'a>(&'a dyn RequestExt);
166
166
167
167
impl < ' a > Display for FullPath < ' a > {
168
168
fn fmt ( & self , f : & mut Formatter < ' _ > ) -> fmt:: Result {
169
+ let request = self . 0 ;
170
+
171
+ let original_path = request. extensions ( ) . find :: < OriginalPath > ( ) ;
169
172
// Unwrap shouldn't panic as no other code has access to the private struct to remove it
170
- write ! (
171
- f,
172
- "{}" ,
173
- self . 0 . extensions( ) . find:: <OriginalPath >( ) . unwrap( ) . 0
174
- ) ?;
175
- if let Some ( q_string) = self . 0 . query_string ( ) {
173
+ let path = original_path. map ( |p| p. 0 . as_str ( ) ) . unwrap ( ) ;
174
+
175
+ write ! ( f, "{}" , path) ?;
176
+
177
+ if let Some ( q_string) = request. query_string ( ) {
176
178
write ! ( f, "?{}" , q_string) ?;
177
179
}
178
180
Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments