Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a re-implementation of the merge feature, which I initially attempted to implement in #155
This new implementation is heavily inspired from the KeePassXC implementation.
I've been using this commit for over 6 months without any issues. I'd like to get the PR merged so that I don't have to rebase constantly, even though there are still some features missing. I prefixed the name of the cargo feature with an underscore so that it is hidden from docs.rs. I'll remove the underscore once we have feature parity with the KeePassXC implementation. The main merge feature missing is database metadata merging. I will add an issue to track this once this PR is merged.
Apart from the missing features, my main concern with the current implementation is that it is not as efficient as it could be. The main reason for this is that the children of a node are stored as a list, which makes it inefficient to find a node in the tree even if we have the path to that node. Optimizing that would require a bigger refactoring, and I honestly don't think it's worth it for a first draft of the feature.