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

The Visitor and Visitable traits methods should be marked unsafe #34

Open
declanvk opened this issue Aug 26, 2024 · 0 comments
Open

The Visitor and Visitable traits methods should be marked unsafe #34

declanvk opened this issue Aug 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@declanvk
Copy link
Owner

  1. The Visitor/Visitable trait methods likely all need to be marked unsafe, since they are operating on the raw nodes of the tree. The visitor implementations so far include "Safety" doc-comments requiring read-only access, but it probably should be recorded in the function signature
  2. The visit_with functions work better when they're using a reference pointing to the actual location of N, not a local copy on the stack. For example, the DotPrinter will attempt to print node addresses by converting the given reference into a pointer, but this only really works if the reference points to the actual node location.
@declanvk declanvk added the bug Something isn't working label Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant