Skip to content

Conversation

@pipex
Copy link
Contributor

@pipex pipex commented Jul 30, 2025

When constructing the tree, if the first route is the empty string "" the root would be overwritten due to the self.prefix.is_empty().

This adds an additional check to ensure the root is actually None before returning a root node.

Resolves #75

@pipex pipex force-pushed the fix-routing-empty branch from 62e4d49 to b2b0237 Compare July 30, 2025 23:35
When constructing the tree, if the first route is the empty string `""`
the root would be overwritten due to the `self.prefix.is_empty()`.

This adds an additional check to ensure the root is actually `None`
before returning a root node.

Resolves ibraheemdev#75
@pipex pipex force-pushed the fix-routing-empty branch from b2b0237 to f745f5c Compare July 30, 2025 23:49
@ibraheemdev
Copy link
Owner

Thanks! The CI failure is unrelated.

@ibraheemdev ibraheemdev merged commit 8fef456 into ibraheemdev:master Jul 31, 2025
4 of 5 checks passed
@ibraheemdev ibraheemdev added the bug Something isn't working label Jul 31, 2025
pipex added a commit to balena-io-modules/mahler-rs that referenced this pull request Aug 1, 2025
Inconsistent behavior would happen when inserting an empty route first
in the domain. This was traced to the matchit dependency and fixed on
ibraheemdev/matchit#76, this update that
dependency to that revision

Change-type: patch
pipex added a commit to balena-io-modules/mahler-rs that referenced this pull request Aug 1, 2025
Inconsistent behavior would happen when inserting an empty route first
in the domain. This was traced to the matchit dependency and fixed on
ibraheemdev/matchit#76, this update that
dependency to that revision

Change-type: patch
pipex added a commit to balena-io-modules/mahler-rs that referenced this pull request Aug 8, 2025
We need to wait for a new version of matchit to include the release
ibraheemdev/matchit#76

Change-type: patch
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

Successfully merging this pull request may close these issues.

Routing empty path leads to inconsistent results

2 participants