File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -35,29 +35,27 @@ impl UrlPattern {
3535 None => ( None , options) ,
3636 } ;
3737
38- let base_url = if let Some ( base_url ) = base_url {
39- Some (
38+ let base_url = match base_url {
39+ Some ( base_url ) => Some (
4040 base_url
4141 . extract :: < String > ( ) ?
4242 . parse :: < url:: Url > ( )
4343 . map_err ( :: urlpattern:: Error :: Url )
4444 . map_err ( Error ) ?,
45- )
46- } else {
47- None
45+ ) ,
46+ None => None ,
4847 } ;
4948
50- let options = if let Some ( options ) = options {
51- :: urlpattern:: UrlPatternOptions {
49+ let options = match options {
50+ Some ( options ) => :: urlpattern:: UrlPatternOptions {
5251 ignore_case : options
5352 . get_item ( "ignoreCase" ) ?
5453 . map ( |v| v. extract :: < bool > ( ) )
5554 . transpose ( ) ?
5655 . unwrap_or ( false ) ,
5756 ..:: urlpattern:: UrlPatternOptions :: default ( )
58- }
59- } else {
60- :: urlpattern:: UrlPatternOptions :: default ( )
57+ } ,
58+ None => :: urlpattern:: UrlPatternOptions :: default ( ) ,
6159 } ;
6260
6361 let init: :: urlpattern:: UrlPatternInit = match input {
You can’t perform that action at this time.
0 commit comments