Skip to content

Commit b90cfad

Browse files
tormolThomas Bahn
authored andcommitted
Implement Default for AsciiChar
For consistency with `char`. (Default cannot be derived for enums)
1 parent 7f107dd commit b90cfad

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ascii_char.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,12 @@ impl AsciiExt for AsciiChar {
576576
}
577577
}
578578

579+
impl Default for AsciiChar {
580+
fn default() -> AsciiChar {
581+
AsciiChar::Null
582+
}
583+
}
584+
579585
macro_rules! impl_into_partial_eq_ord {($wider:ty, $to_wider:expr) => {
580586
impl From<AsciiChar> for $wider {
581587
#[inline]

0 commit comments

Comments
 (0)