Open Young-Flash opened 3 months ago
Thanks for filing this!
Looking at the bug in the error message, they mention how you can't just then dereference the pointer and need to"[make] sure that the reference stops being used before a second reference is created". In reviewing this code, I think we do not do this, because multiple trace::scope()s will be nested.
I think the proper fix would be to remove the callbacks from if_enabled and scope so that it's impossible to use incorrectly.
Thanks for the great project.
I am using rustc 1.77.2, when I run
cargo test
, it warnning:the code could be refactor to:
if it's ok with you, I'd like to make a PR