Skip to content

Commit d3f3c2a

Browse files
committed
fix: wip
1 parent b00b684 commit d3f3c2a

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/url.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -381,13 +381,17 @@ impl PyMultiHostUrl {
381381
// build multi-host url
382382
for single_host in hosts.as_deref().unwrap_or_default() {
383383
let mut multi_url = format!("{scheme}://");
384-
if single_host.username.is_some()
385-
&& single_host.host.is_some()
386-
&& single_host.password.is_some()
387-
&& single_host.port.is_some()
384+
if single_host.username.is_some() && single_host.password.is_none()
388385
{
389-
todo!()
386+
multi_url.push_str(*single_host.username);
387+
multi_url.push('@');
390388
}
389+
else if single_host.username.is_none() && single_host.password.is_some()
390+
{
391+
multi_url.push_str(*single_host.password);
392+
multi_url.push('@');
393+
};
394+
if single_host.host
391395
else {
392396
return Err(PyValueError::new_err("Incomplete object."));
393397
};

0 commit comments

Comments
 (0)