Add missing BorrowMut for ArrayString

This commit is contained in:
Dominic
2022-11-09 17:07:18 +01:00
parent 67ec907a98
commit 9dd3f3c67b
+6 -1
View File
@@ -1,4 +1,4 @@
use std::borrow::Borrow;
use std::borrow::{Borrow, BorrowMut};
use std::cmp;
use std::convert::TryFrom;
use std::fmt;
@@ -479,6 +479,11 @@ impl<const CAP: usize> Borrow<str> for ArrayString<CAP>
fn borrow(&self) -> &str { self }
}
impl<const CAP: usize> BorrowMut<str> for ArrayString<CAP>
{
fn borrow_mut(&mut self) -> &mut str { self }
}
impl<const CAP: usize> AsRef<str> for ArrayString<CAP>
{
fn as_ref(&self) -> &str { self }