From aebcf7b5d4a37a08f2a64f7660b7e3d890476dba Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 9 May 2021 20:05:43 +0200 Subject: Better Debug impl for InternedWrapper --- crates/hir_ty/src/interner.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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}; #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct Interner; -#[derive(PartialEq, Eq, Hash, Debug)] +#[derive(PartialEq, Eq, Hash)] pub struct InternedWrapper(T); +impl fmt::Debug for InternedWrapper { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + fmt::Debug::fmt(&self.0, f) + } +} + impl std::ops::Deref for InternedWrapper { type Target = T; -- cgit v1.2.3