Fix UTF16Const::as_ref

Don't include the terminating null
This commit is contained in:
MSxDOS
2019-07-16 19:19:44 +03:00
parent 8b9de286e7
commit 8a916ea17e
+1 -1
View File
@@ -17,7 +17,7 @@ impl UTF16Const {
impl AsRef<[u16]> for UTF16Const {
#[inline]
fn as_ref(&self) -> &[u16] {
self.0
&self.0[..self.len()]
}
}
impl Copy for UTF16Const {}