diff options
author | Florian Diebold <[email protected]> | 2021-05-09 19:05:43 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-05-21 16:48:34 +0100 |
commit | aebcf7b5d4a37a08f2a64f7660b7e3d890476dba (patch) | |
tree | 95c0a17d309dbdb5021b482c3749460aa49b4d2d /crates | |
parent | 0f7f1f070584fbdc07a10df47b95b147698551fd (diff) |
Better Debug impl for InternedWrapper
Diffstat (limited to 'crates')
-rw-r--r-- | crates/hir_ty/src/interner.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/hir_ty/src/interner.rs b/crates/hir_ty/src/interner.rs index 7b4119747..8e77378ab 100644 --- a/crates/hir_ty/src/interner.rs +++ b/crates/hir_ty/src/interner.rs | |||
@@ -15,9 +15,15 @@ use std::{fmt, sync::Arc}; | |||
15 | #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] | 15 | #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] |
16 | pub struct Interner; | 16 | pub struct Interner; |
17 | 17 | ||
18 | #[derive(PartialEq, Eq, Hash, Debug)] | 18 | #[derive(PartialEq, Eq, Hash)] |
19 | pub struct InternedWrapper<T>(T); | 19 | pub struct InternedWrapper<T>(T); |
20 | 20 | ||
21 | impl<T: fmt::Debug> fmt::Debug for InternedWrapper<T> { | ||
22 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ||
23 | fmt::Debug::fmt(&self.0, f) | ||
24 | } | ||
25 | } | ||
26 | |||
21 | impl<T> std::ops::Deref for InternedWrapper<T> { | 27 | impl<T> std::ops::Deref for InternedWrapper<T> { |
22 | type Target = T; | 28 | type Target = T; |
23 | 29 | ||