Skip to content

Commit 9dd3f3c

Browse files
committed
Add missing BorrowMut for ArrayString
1 parent 67ec907 commit 9dd3f3c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/array_string.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::borrow::Borrow;
1+
use std::borrow::{Borrow, BorrowMut};
22
use std::cmp;
33
use std::convert::TryFrom;
44
use std::fmt;
@@ -479,6 +479,11 @@ impl<const CAP: usize> Borrow<str> for ArrayString<CAP>
479479
fn borrow(&self) -> &str { self }
480480
}
481481

482+
impl<const CAP: usize> BorrowMut<str> for ArrayString<CAP>
483+
{
484+
fn borrow_mut(&mut self) -> &mut str { self }
485+
}
486+
482487
impl<const CAP: usize> AsRef<str> for ArrayString<CAP>
483488
{
484489
fn as_ref(&self) -> &str { self }

0 commit comments

Comments
 (0)