We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab36f52 commit 5aa5c3dCopy full SHA for 5aa5c3d
src/ascii_string.rs
@@ -468,6 +468,13 @@ impl From<Vec<AsciiChar>> for AsciiString {
468
}
469
470
471
+impl From<AsciiChar> for AsciiString {
472
+ #[inline]
473
+ fn from(ch: AsciiChar) -> Self {
474
+ AsciiString {vec: vec![ch]}
475
+ }
476
+}
477
+
478
impl Into<Vec<u8>> for AsciiString {
479
fn into(mut self) -> Vec<u8> {
480
// SAFETY: All ascii bytes are valid `u8`, as we are `repr(u8)`.
0 commit comments