21 Commits
Author SHA1 Message Date
Oliver Hamlet 3890c3a095 Improve some doc comments 2025-12-30 15:19:42 +00:00
Oliver Hamlet 9b81824851 Fix writing metadata files in current working directory 2025-12-29 10:22:12 +00:00
Oliver Hamlet a677041a55 Fix new Clippy errors
Introduced in Clippy v0.1.89 / Rust v1.89.0.
2025-08-11 18:54:54 +01:00
Oliver Hamlet d4d6893491 Use enums instead of bools in public API
Replace the boolean parameters for including user metadata and evaluating conditions with MergeMode and EvalMode enums.

The C++ and Python wrappers still use booleans because they're more constrained than enums in those languages, which can be given invalid values.
2025-08-02 16:05:36 +01:00
Oliver Hamlet 4e74a174c5 Enable the doc_markdown Clippy lint in libloot 2025-08-02 16:05:36 +01:00
Oliver Hamlet c61fcd248d Be more specific with clippy's exhaustive_enums lint exceptions 2025-08-02 16:05:36 +01:00
Oliver Hamlet 67b50ee8d9 Deny unreachable_pub lint in libloot 2025-07-31 22:10:44 +01:00
Oliver Hamlet ea48f5d14e Avoid an artificial error scenario 2025-07-22 19:56:15 +01:00
Oliver Hamlet 04b8f44592 Update doc comment for Database::load_masterlist_with_prelude() 2025-06-11 17:49:48 +01:00
Oliver Hamlet eb238c4774 Make GroupsPathError and MetadataRetrievalError enums non-exhaustive 2025-05-16 19:00:54 +01:00
Oliver Hamlet aa5344ca92 Replace names used for game types
Use the game names rather than their acronyms (aside from suffixes, which are widely used).

This also changes the CXX wrapper to use PascalCase for the game types it exposes for consistency. The outer C++ wrapper is unchanged.
2025-04-23 18:02:17 +01:00
Oliver Hamlet 2aaa13bd7e Deny the clippy::str_to_string lint 2025-04-23 00:16:09 +01:00
Oliver Hamlet 919d2c229e Deny some clippy restriction lints
A few lints are commented out because they seem like good ideas but
fixing the errors they cause would cause too much churn for it to be
done in this commit.
2025-04-23 00:16:08 +01:00
Oliver Hamlet 0e98c82b57 Deny some rustc lints
The unreachable_pub lint is commented out because it seems like a good
idea but fixing the errors it causes would cause too much churn for it
to be done in this commit.
2025-04-23 00:16:08 +01:00
Oliver Hamlet 724b8b55c1 Deny most of clippy's pedantic lints
They suggested a lot of good code style improvements and spotted a few mistakes.
2025-04-23 00:16:08 +01:00
Oliver Hamlet fb1e1ad360 Sync with libloot v0.26.0 2025-04-20 15:58:13 +01:00
Oliver Hamlet 0b0bc4eac6 Remove some unnecessary turbofishes 2025-04-11 21:58:06 +01:00
Oliver Hamlet 2076478a4f Replace overwrite boolean with an enum 2025-03-25 22:02:33 +00:00
Oliver Hamlet 7f62d494e9 Port unit tests from the C++ libloot implementation
This gives function/line/region coverage of 88%/91%/84%. Most of the
translation bugs fixed in earlier commits were found while writing these
tests: the tests were kept separate to not drown out the fixes in the
commit diffs.
2025-03-25 20:56:19 +00:00
Oliver Hamlet 99f81ca783 Fix calling set_logging_callback multiple times
Store the callback as a global, independent of the log crate, and add logging macros that invoke the callback as well as the log crate's log! macro.
2025-03-25 20:56:11 +00:00
Oliver Hamlet cc51f8b19a Rework error handling 2025-03-25 20:41:31 +00:00