Skip to content

Commit 78dd631

Browse files
committed
Refactor base_url handling
1 parent 7b2d700 commit 78dd631

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/lib.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,11 @@ impl UrlPattern {
2727
let base_url = baseURL;
2828

2929
let (base_url, options) = match base_url {
30-
Some(value) => {
31-
if let Ok(options_dict) = value.cast::<PyDict>() {
32-
(None, Some(options_dict))
33-
} else if value.is_none() {
34-
(None, options)
30+
Some(base_url) => {
31+
if let Ok(options) = base_url.cast::<PyDict>() {
32+
(None, Some(options))
3533
} else {
36-
(base_url, options)
34+
(Some(base_url), options)
3735
}
3836
}
3937
None => (None, options),

0 commit comments

Comments
 (0)