Introduce an option for disabling the automatic resolver in FileSourceFile #133
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.
A new feature with granted retro compatibility.
To solve the problem introduced in #132 I have introduced the solution number 3:
The struct File now has two new methods,
with_exact_name
andexact_name
, the first to create a File with a FileSourceFile imposed to not search the extension of the file.With this approach, one can load a file named
Settings.wrongextension
as a Toml file like before, but if the file is missing the program will not search another file named for exampleSettings.yaml
without asking.I've introduced three tests for the new methods, and a very small fix of the wrong extension error message, because before it used the absolute path when the not found error used the relative/given path.