We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0637cb7 + 9dd3f3c commit 0e131fdCopy full SHA for 0e131fd
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;
@@ -481,6 +481,11 @@ impl<const CAP: usize> Borrow<str> for ArrayString<CAP>
481
fn borrow(&self) -> &str { self }
482
}
483
484
+impl<const CAP: usize> BorrowMut<str> for ArrayString<CAP>
485
+{
486
+ fn borrow_mut(&mut self) -> &mut str { self }
487
+}
488
+
489
impl<const CAP: usize> AsRef<str> for ArrayString<CAP>
490
{
491
fn as_ref(&self) -> &str { self }
0 commit comments