Skip to content

Add convenience function NodeMut::replace #189

@hasezoey

Description

@hasezoey

I have found that i would want to replace a given node in-place, the current workaround i use i to just push a new sibling, then prune the current node:

node_mut.push_sibling_tree(Side::Left, new_tree);
node_mut.prune();

Maybe i am just missing something?

Realworld code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions