Skip to content

Commit 08e6257

Browse files
authored
Improve debug implementation (#14)
1 parent 2bd970d commit 08e6257

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/string.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use alloc::{
44
string::{String},
55
sync::Arc,
66
};
7-
use core::{borrow::Borrow, fmt::Write as _, hash::Hash, str::FromStr};
7+
use core::{borrow::Borrow, hash::Hash, str::FromStr};
88

99
use crate::{
1010
array::FixedArray,
@@ -247,9 +247,7 @@ impl<LenT: ValidLength> core::fmt::Display for FixedString<LenT> {
247247

248248
impl<LenT: ValidLength> core::fmt::Debug for FixedString<LenT> {
249249
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
250-
f.write_char('"')?;
251-
f.write_str(self)?;
252-
f.write_char('"')
250+
write!(f, "{:?}", self.as_str())
253251
}
254252
}
255253

0 commit comments

Comments
 (0)