Better Debug impl for InternedWrapper
This commit is contained in:
parent
0f7f1f0705
commit
aebcf7b5d4
@ -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>(T);
|
||||
|
||||
impl<T: fmt::Debug> fmt::Debug for InternedWrapper<T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
fmt::Debug::fmt(&self.0, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> std::ops::Deref for InternedWrapper<T> {
|
||||
type Target = T;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user