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.
1 parent b2886dc commit aadc8dfCopy full SHA for aadc8df
src/array_string.rs
@@ -5,6 +5,7 @@ use std::fmt;
5
use std::hash::{Hash, Hasher};
6
use std::mem::MaybeUninit;
7
use std::ops::{Deref, DerefMut};
8
+use std::path::Path;
9
use std::ptr;
10
use std::slice;
11
use std::str;
@@ -501,6 +502,12 @@ impl<const CAP: usize> fmt::Debug for ArrayString<CAP>
501
502
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { (**self).fmt(f) }
503
}
504
505
+impl<const CAP: usize> AsRef<Path> for ArrayString<CAP> {
506
+ fn as_ref(&self) -> &Path {
507
+ self.as_str().as_ref()
508
+ }
509
+}
510
+
511
impl<const CAP: usize> fmt::Display for ArrayString<CAP>
512
{
513
0 commit comments