Skip to content

Commit b3970e6

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 ec284ba commit b3970e6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/ascii.rs

+5-5
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)
@@ -33,10 +33,10 @@ pub enum Ascii {
3333
/**`'\n'`*/LineFeed = 10,
3434
/** [Vertical tab](http://en.wikipedia.org/wiki/Vertical_Tab). In some other languages
3535
* '\v' is not supported by Rust.
36-
*/ VT = 11,
36+
*/ VerticalTab = 11,
3737
/** [Form Feed](http://en.wikipedia.org/wiki/Form_Feed)
3838
* '\f' is not supported by Rust.
39-
*/ FF = 12,
39+
*/ FormFeed = 12,
4040
/**`'\r'`*/CarriageReturn = 13,
4141
/** [Shift In](http://en.wikipedia.org/wiki/Shift_Out_and_Shift_In_characters)
4242
*/ SI = 14,
@@ -171,7 +171,7 @@ pub enum Ascii {
171171
/**`'}'`*/ CurlyBraceClose = 125,
172172
/**`'~'`*/ Tilde = 126,
173173
/**[Delete](http://en.wikipedia.org/wiki/Delete_character)
174-
*/ Delete = 127,
174+
*/ DEL = 127,
175175
}
176176

177177
impl Ascii {
@@ -268,7 +268,7 @@ impl Ascii {
268268
/// ```
269269
#[inline]
270270
pub fn is_control(&self) -> bool {
271-
self.as_byte() < 0x20 || *self == Ascii::Delete
271+
self.as_byte() < 0x20 || *self == Ascii::DEL
272272
}
273273

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

0 commit comments

Comments
 (0)