Skip to content

Commit 4fbd050

Browse files
committed
Impl From<&mut AsciiStr>
1 parent fc8a916 commit 4fbd050

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ascii_str.rs

+5
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,11 @@ macro_rules! impl_into {
237237
unsafe{ mem::transmute(slice) }
238238
}
239239
}
240+
impl<'a> From<&'a mut AsciiStr> for &'a mut $wider {
241+
fn from(slice: &mut AsciiStr) -> &mut $wider {
242+
unsafe{ mem::transmute(slice) }
243+
}
244+
}
240245
impl From<Box<AsciiStr>> for Box<$wider> {
241246
fn from(owned: Box<AsciiStr>) -> Box<$wider> {
242247
unsafe{ mem::transmute(owned) }

0 commit comments

Comments
 (0)