Skip to content

Commit c290db0

Browse files
committed
Make Ascii variant names consistent
Control code names get expanded iff they have an escape code in [this table](. Else the two-or-three letter uppercase code name is used. )# modified: src/ascii.rs
1 parent 0bcced9 commit c290db0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ascii.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use AsciiCast;
1010
#[derive(Clone, PartialEq, PartialOrd, Ord, Eq, Hash, Copy)]
1111
#[repr(u8)]
1212
pub enum Ascii {
13-
/**`'\0'`*/NUL = 0,
13+
/**`'\0'`*/Null = 0,
1414
/** [Start Of Heading](http://en.wikipedia.org/wiki/Start_of_Heading)
1515
*/ SOH = 1,
1616
/** [Start Of teXt](http://en.wikipedia.org/wiki/Start_of_Text)
@@ -36,11 +36,11 @@ pub enum Ascii {
3636
/** [Vertical tab](http://en.wikipedia.org/wiki/Vertical_Tab)
3737
3838
'\v' is not supported by Rust.
39-
*/ VT = 11,
39+
*/ VerticalTab = 11,
4040
/** [Form Feed](http://en.wikipedia.org/wiki/Form_Feed)
4141
4242
'\f' is not supported by Rust.
43-
*/ FF = 12,
43+
*/ FormFeed = 12,
4444
/**`'\r'`*/CarriageReturn = 13,
4545
/** [Shift In](http://en.wikipedia.org/wiki/Shift_Out_and_Shift_In_characters)
4646
*/ SI = 14,
@@ -175,8 +175,8 @@ pub enum Ascii {
175175
/**`'|'`*/ VerticalBar = 124,
176176
/**`'}'`*/ CurlyBraceClose = 125,
177177
/**`'~'`*/ Tilde = 126,
178-
/**[Delete](http://en.wikipedia.org/wiki/Delete_character)
179-
*/ Delete = 127,
178+
/** [Delete](http://en.wikipedia.org/wiki/Delete_character)
179+
*/ DEL = 127,
180180
}
181181

182182
impl Ascii {
@@ -273,7 +273,7 @@ impl Ascii {
273273
/// ```
274274
#[inline]
275275
pub fn is_control(&self) -> bool {
276-
self.as_byte() < 0x20 || *self == Ascii::Delete
276+
self.as_byte() < 0x20 || *self == Ascii::DEL
277277
}
278278

279279
/// Checks if the character is printable (except space)

0 commit comments

Comments
 (0)