1
Fork 0
mirror of https://github.com/RGBCube/cstree synced 2025-07-27 09:07:44 +00:00

Derive Debug for the default TokenInterner (#20)

This commit is contained in:
DQ 2021-02-22 19:11:14 +01:00 committed by GitHub
parent 8642b8af77
commit 773f65f1b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -4,6 +4,7 @@ use fxhash::FxBuildHasher;
use lasso::{Capacity, Interner, IntoReader, IntoReaderAndResolver, IntoResolver, Reader, Resolver, Rodeo, Spur}; use lasso::{Capacity, Interner, IntoReader, IntoReaderAndResolver, IntoResolver, Reader, Resolver, Rodeo, Spur};
/// The default [`Interner`] used to deduplicate green token strings. /// The default [`Interner`] used to deduplicate green token strings.
#[derive(Debug)]
pub struct TokenInterner { pub struct TokenInterner {
rodeo: Rodeo<Spur, FxBuildHasher>, rodeo: Rodeo<Spur, FxBuildHasher>,
} }

View file

@ -142,4 +142,7 @@ fn assert_debug_display() {
f::<SyntaxElement<(), lasso::Rodeo>>(); f::<SyntaxElement<(), lasso::Rodeo>>();
f::<SyntaxElementRef<'static, (), lasso::Rodeo>>(); f::<SyntaxElementRef<'static, (), lasso::Rodeo>>();
f::<cstree::NodeOrToken<String, u128>>(); f::<cstree::NodeOrToken<String, u128>>();
fn dbg<T: fmt::Debug>() {}
dbg::<GreenNodeBuilder<'static, 'static>>();
} }