From 255164ce251696e57a60cecba339fe6b6ec50944 Mon Sep 17 00:00:00 2001 From: Thomas Zahner Date: Mon, 10 Jun 2024 17:11:15 +0200 Subject: [PATCH] Don't trim mailto: prefix when converting a Uri into a string (#1438) --- lychee-lib/src/types/uri/valid.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lychee-lib/src/types/uri/valid.rs b/lychee-lib/src/types/uri/valid.rs index 9e9bb72a72..573f685295 100644 --- a/lychee-lib/src/types/uri/valid.rs +++ b/lychee-lib/src/types/uri/valid.rs @@ -22,13 +22,10 @@ pub struct Uri { impl Uri { /// Returns the string representation of the `Uri`. - /// - /// If it's an email address, returns the string with scheme stripped. - /// Otherwise returns the string as-is. #[inline] #[must_use] pub fn as_str(&self) -> &str { - self.url.as_ref().trim_start_matches("mailto:") + self.url.as_ref() } #[inline]