diff options
author | aviac <aviac@mailbox.org> | 2024-05-11 13:02:06 +0200 |
---|---|---|
committer | aviac <aviac@mailbox.org> | 2024-05-11 13:02:06 +0200 |
commit | 8188ba5f43e9d0e072d0e97a60f6efb1faae1d49 (patch) | |
tree | 71d0b8665c0e5c8384421b710a36723f235482ea /src | |
parent | fix: implement review comment regarding non standard ssh port scenario (diff) | |
download | forgejo-api-8188ba5f43e9d0e072d0e97a60f6efb1faae1d49.tar.xz forgejo-api-8188ba5f43e9d0e072d0e97a60f6efb1faae1d49.zip |
chore: ✨
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -274,8 +274,9 @@ where raw_url .as_ref() .map(parse_ssh_url) - .map(|res| res.map_err(DE::custom).map(Some)) - .unwrap_or(Ok(None)) + .map(|res| res.map_err(DE::custom)) + .transpose() + .or(Ok(None)) } fn parse_ssh_url(raw_url: &String) -> Result<Url, url::ParseError> { |