Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FrozenMap and friends should implement Debug #32

Open
sffc opened this issue Oct 18, 2022 · 4 comments
Open

FrozenMap and friends should implement Debug #32

sffc opened this issue Oct 18, 2022 · 4 comments

Comments

@sffc
Copy link
Contributor

sffc commented Oct 18, 2022

No description provided.

@sffc
Copy link
Contributor Author

sffc commented Oct 18, 2022

Workaround, assuming you have ownership:

println!("{:?}", my_map.as_mut());

@Manishearth
Copy link
Owner

Yeah we should add it

@huitseeker
Copy link
Contributor

See also #31.

Is the concern with a derived variant that the RwLock / Cell / ... clobbers the printing of the inner content? If so is that concern still valid post rust-lang/rust#83559 ?

@Manishearth
Copy link
Owner

No, not all of the elsa types use RwLock or Cell. Some have their own reentrancy guards that need to be respected

huitseeker added a commit to huitseeker/elsa that referenced this issue Sep 27, 2023
- partially contributes to Manishearth#32,
- Implements `Debug` trait for those structures where checking for reentrancy is straightforward.
huitseeker added a commit to huitseeker/elsa that referenced this issue Sep 27, 2023
- partially contributes to Manishearth#32,
- Implements `Debug` trait for those structures where checking for reentrancy is straightforward.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants