From 4b0a9c9bc3e30215366cb1106645e5ddcfa93b92 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 8 Dec 2021 22:54:51 -0800 Subject: [PATCH] Delete Utf8Lossy::from_str --- library/core/src/str/lossy.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/library/core/src/str/lossy.rs b/library/core/src/str/lossy.rs index 32bd22846e7dd..6ec1c93908fc7 100644 --- a/library/core/src/str/lossy.rs +++ b/library/core/src/str/lossy.rs @@ -12,11 +12,6 @@ pub struct Utf8Lossy { } impl Utf8Lossy { - #[must_use] - pub fn from_str(s: &str) -> &Utf8Lossy { - Utf8Lossy::from_bytes(s.as_bytes()) - } - #[must_use] pub fn from_bytes(bytes: &[u8]) -> &Utf8Lossy { // SAFETY: Both use the same memory layout, and UTF-8 correctness isn't required.