mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-28 20:16:58 +03:00
Delete Utf8Lossy::from_str
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user