Skip to content

Answer None from try_borrow_focus below a dangling path held as an empty node - #207

Merged
Adam-Vandervorst merged 1 commit into
Adam-Vandervorst:masterfrom
imlvts:fix/try-borrow-focus-below-dangling
Dec 1, 2026
Merged

Adam-Vandervorst merged 1 commit into
Adam-Vandervorst:masterfrom
imlvts:fix/try-borrow-focus-below-dangling

Conversation

@imlvts

@imlvts imlvts commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

With the focus below a dangling path whose node is empty, node_get_child finds that empty node, having consumed less of the key than the focus needs. try_borrow_focus and try_borrow_focus_mut handed it out as if it were the focus's node; a debug build failed the consumed == key length assertion. The node is above the focus, and the focus doesn't exist, so both now answer None, as the read zipper does.

…pty node

With the focus below a dangling path whose node is empty, node_get_child
finds that empty node, having consumed less of the key than the focus needs.
try_borrow_focus and try_borrow_focus_mut handed it out as if it were the
focus's node; a debug build failed the consumed == key length assertion.  The
node is above the focus, and the focus doesn't exist, so both now answer None,
as the read zipper does.
@imlvts
imlvts marked this pull request as ready for review November 30, 2026 09:22
@Adam-Vandervorst
Adam-Vandervorst merged commit 0c8d10d into Adam-Vandervorst:master Dec 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants