From feeae27a56f034a0d041a4985fa731ee5b42d315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20Ochagav=C3=ADa?= Date: Sat, 19 Jul 2014 12:30:35 +0200 Subject: [PATCH] Deprecated `str::raw::from_byte` Use `string:raw::from_utf8` instead [breaking-change] --- src/libcollections/str.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index 05107f5dda53..e83e617dba7f 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -598,9 +598,10 @@ pub mod raw { string::raw::from_utf8(v) } - /// Converts a byte to a string. + /// Deprecated. Use `String::from_bytes` + #[deprecated = "Use String::from_bytes"] pub unsafe fn from_byte(u: u8) -> String { - from_utf8_owned(vec![u]) + String::from_bytes(vec![u]) } #[test]