(&self, f: &mut fmt::Formatter<'_>)
| 50 | |
| 51 | impl fmt::Debug for StringPool { |
| 52 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
| 53 | struct Strings<'a>(&'a StringPool); |
| 54 | impl fmt::Debug for Strings<'_> { |
| 55 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
| 56 | f.debug_map() |
| 57 | .entries( |
| 58 | self.0 |
| 59 | .strings |
| 60 | .iter() |
| 61 | .enumerate() |
| 62 | .map(|(i, s)| (Atom::new(i), s)), |
| 63 | ) |
| 64 | .finish() |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | f.debug_struct("StringPool") |
| 69 | .field("strings", &Strings(self)) |
| 70 | .finish() |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | impl TryClone for StringPool { |