From 8188ba5f43e9d0e072d0e97a60f6efb1faae1d49 Mon Sep 17 00:00:00 2001 From: aviac Date: Sat, 11 May 2024 13:02:06 +0200 Subject: [PATCH] =?UTF-8?q?chore:=20=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 2463d2c..761c2fa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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 {