File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,8 @@ impl UrlPattern {
4242 None => ( None , options) ,
4343 } ;
4444
45- if let Some ( UrlPatternInput :: Init ( _) ) = input {
46- if let Some ( _) = base_url {
47- return Err ( PyTypeError :: new_err ( "cannot use dict input with baseURL" ) ) ;
48- }
45+ if matches ! ( input, Some ( UrlPatternInput :: Init ( _) ) ) && base_url. is_some ( ) {
46+ return Err ( PyTypeError :: new_err ( "cannot use dict input with baseURL" ) ) ;
4947 }
5048
5149 let init: :: urlpattern:: UrlPatternInit = match input {
@@ -162,7 +160,7 @@ impl UrlPattern {
162160 }
163161 } ,
164162 UrlPatternInput :: Init ( init) => {
165- if let Some ( _ ) = baseURL {
163+ if baseURL . is_some ( ) {
166164 return Err ( PyTypeError :: new_err ( "cannot use dict input with baseURL" ) ) ;
167165 }
168166
@@ -251,7 +249,7 @@ impl UrlPattern {
251249 }
252250 } ,
253251 UrlPatternInput :: Init ( init) => {
254- if let Some ( _ ) = baseURL {
252+ if baseURL . is_some ( ) {
255253 return Err ( PyTypeError :: new_err ( "cannot use dict input with baseURL" ) ) ;
256254 }
257255
You can’t perform that action at this time.
0 commit comments