Skip to content

Commit 091ce19

Browse files
committed
Deprecated str::raw::from_byte
Use `string:raw::from_utf8` instead [breaking-change]
1 parent 5c6d1c8 commit 091ce19

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libcollections/str.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,9 +596,10 @@ pub mod raw {
596596
string::raw::from_utf8(v)
597597
}
598598

599-
/// Converts a byte to a string.
599+
/// Deprecated. Use `String::from_bytes`
600+
#[deprecated = "Use String::from_bytes"]
600601
pub unsafe fn from_byte(u: u8) -> String {
601-
from_utf8_owned(vec![u])
602+
String::from_bytes(vec![u])
602603
}
603604

604605
#[test]

0 commit comments

Comments
 (0)