We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
BorrowMut
ArrayString
1 parent 67ec907 commit 9dd3f3cCopy full SHA for 9dd3f3c
src/array_string.rs
@@ -1,4 +1,4 @@
1
-use std::borrow::Borrow;
+use std::borrow::{Borrow, BorrowMut};
2
use std::cmp;
3
use std::convert::TryFrom;
4
use std::fmt;
@@ -479,6 +479,11 @@ impl<const CAP: usize> Borrow<str> for ArrayString<CAP>
479
fn borrow(&self) -> &str { self }
480
}
481
482
+impl<const CAP: usize> BorrowMut<str> for ArrayString<CAP>
483
+{
484
+ fn borrow_mut(&mut self) -> &mut str { self }
485
+}
486
+
487
impl<const CAP: usize> AsRef<str> for ArrayString<CAP>
488
{
489
fn as_ref(&self) -> &str { self }
0 commit comments