Skip to content

Commit bebc340

Browse files
committed
Fix unintended rename and a doc example
1 parent 16076d4 commit bebc340

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libcore/ascii.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ pub struct EscapeDefault {
5757
/// # Examples
5858
///
5959
/// ```
60+
/// use core::ascii;
61+
///
6062
/// let escaped = ascii::escape_default(b'0').next().unwrap();
6163
/// assert_eq!(b'0', escaped);
6264
///
@@ -98,7 +100,7 @@ pub struct EscapeDefault {
98100
/// assert_eq!(b'd', escaped.next().unwrap());
99101
/// ```
100102
#[unstable(feature = "core_ascii", issue = "46409")]
101-
pub fn escape_ascii(c: u8) -> EscapeDefault {
103+
pub fn escape_default(c: u8) -> EscapeDefault {
102104
let (data, len) = match c {
103105
b'\t' => ([b'\\', b't', 0, 0], 2),
104106
b'\r' => ([b'\\', b'r', 0, 0], 2),

0 commit comments

Comments
 (0)