Skip to content

Refactor Config::load #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: fix-merge-toml-values
Choose a base branch
from

Conversation

thomie
Copy link
Owner

@thomie thomie commented Apr 11, 2025

Split Config::load into 2 smaller functions:

  1. A function to load a ConfigRaw from a path
  2. A function to apply a ConfigRaw to a Config

The resulting code is both shorter, more readable, and more extensible (e.g., it can support more than two config files).

This refactor revealed the bug described in helix-editor#13332.

Split `Config::load` into 2 smaller functions:
 1. A function to load a `ConfigRaw` from a path
 2. A function to apply a `ConfigRaw` to a `Config`

The resulting code is both shorter, more readable, and more extensible
(e.g., it can support more than two config files).

This refactor revealed the bug described in helix-editor#13332.
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.

1 participant