Skip to content

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

Description

@declanvk
  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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions