Add missing BorrowMut for ArrayString
This commit is contained in:
+6
-1
@@ -1,4 +1,4 @@
|
|||||||
use std::borrow::Borrow;
|
use std::borrow::{Borrow, BorrowMut};
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
use std::convert::TryFrom;
|
use std::convert::TryFrom;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
@@ -479,6 +479,11 @@ impl<const CAP: usize> Borrow<str> for ArrayString<CAP>
|
|||||||
fn borrow(&self) -> &str { self }
|
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>
|
impl<const CAP: usize> AsRef<str> for ArrayString<CAP>
|
||||||
{
|
{
|
||||||
fn as_ref(&self) -> &str { self }
|
fn as_ref(&self) -> &str { self }
|
||||||
|
|||||||
Reference in New Issue
Block a user